MySQL is the most widely used multi-user, multi-threading SQL database management system. To optimize MySQL performance, a DBA should have reasonable knowledge of MySQL system variables. This article covers the basics of MySQL server optimization. We will first discuss MySQL optimization during installation. Then we will discuss the seven most important and common system variables. [...]
This article describes how to set up database replication in MySQL. MySQL replication allows you to have an exact copy of a database from a master server on another server (say we can call it as slave), and all updates to the database on the master server are immediately replicated to the database on the [...]
Question:
I use MySQL 5.0.13RC under Linux
I’m trying to create a table with 70 foreign keys and the next message appear :
ERROR 1069: Too many keys specified. Max 64 keys allowed
Can I avoid/modify this restriction easily?
Thank you all.
Question:
I am trying to create a form where I can cut an paste records in a textarea and submits each record as new row in mysql.
Example:
I have records such like this.
—-
Toyota
Honda
BMW
—-
I would like to copy the text and paste it in a textarea then hit submit. The solution I am looking for is an example [...]
Question:
I have to update my mysql db. I have to update a field if it matches 1 of 184 zipcodes. I have a list of zipcodes but dont have any idea of how to created the statment.
UPDATE `cart`.`cart_cust` SET `s_county` = ‘2′ WHERE (zipcode could be one of 184)
Solution:
UPDATE `cart`.`cart_cust` SET `s_county` = ‘2′ WHERE [...]
Question:
I’m using MySQL 5.1, and I’m trying to calculate a percentage. Basically, I have a huge database with all the information regarding projects. What I’m trying to do is the following: all the user requirements are stored in the database. Some of them will be implemented through configuration and others through development. I’m trying to [...]
Question:
I have 2 tables..
tblDetails
HFID | TID | Grade
——————–
1040 | 1 | NULL
1040 | 2 | NULL
1040 | 2 | NULL
5670 | 3 | NULL
5670 | 4 | NULL
8879 | 5 | NULL
tblMain
TID | DPI
————–
1 | 3.4
2 | 5.6
3 | 4.4
4 | 0.1
5 | 1.5
Look tblMain for DPI… add them and update tblDetails.
1+2+3 (3.4+5.6+4.4 = )
Final [...]
Question:
Hi,
I have a text input box for users to leave messages. I have noticed that if one of them uses an ampersand the rest of the text is cut off and not stored in the database. I have tried many things like mysql_real_escape_string() and encodeURI but nothing solve the problem. What can I do to [...]
Question:
I created a mysql/php ssystem. There is one table and I am using the auto increment feature. In most case the record inserts correctly but there are case where the record does not insert. Could this be because the auto increment does not always work correctly and if it doens’t the mysql call fails. The [...]
Question:
Experts, how do I use the replace function to replace an Enter key stroke with a space or a carriage return with a space. I need to use the ascii equilavent correct? Here is what I tried and its not working
select Replace(bt.View_Status,’^M CR’,”)
from bit_rec_item bt
Solution:
Try this
select REPLACE(REPLACE(bt.View_St
atus, CHR(10), ‘ ‘), CHR(13), ‘ ‘) from [...]