Search the MySQL manual:

A Problems and Common Errors

This chapter lists some common problems and error messages that users have run into. You will learn how to figure out what the problem is, and what to do to solve it. You will also find proper solutions to some common problems.

Subsections

User Comments

Posted by Whit Blauvelt on Wednesday December 18 2002, @5:27pm[Delete] [Edit]

To encrypt replication over an insecure (inter)net: Get <a href=http://stunnel.org>stunnel</a> and install it (after <a href=http://openssl.org>OpenSSL</a> if you don't already have it) on both machines.

On the slave's my.cnf under [mysqld] put:
master-host=localhost
master-port=3307

Start stunnel on the slave with:
stunnel -c -d 3307 -r mastername.com:3307

Start stunnel on the master with:
stunnel -p /path/to/ca.pem -d 3307 -r localhost:3306

Make any necessary adjustments to your firewalls to allow tcp port 3307 in and out. Restart mysql on both systems. With any luck you're in business.

Posted by Darrell Shandrow on Friday May 17 2002, @6:24am[Delete] [Edit]

The instructions for this select statement appear
to be incorrect, thus generating the 1052 error
just mentioned. Try the following, it seemed to
produce the correct result:
select shop.article, dealer, shop.price,
tmp.article, tmp.price from shop, tmp where
shop.article = tmp.article and shop.price =
tmp.price;

Posted by Alex Rozhik on Friday May 17 2002, @6:24am[Delete] [Edit]

Do not forget add function definition to
item_create.h ;)

Posted by linuxfreak on Friday May 17 2002, @6:24am[Delete] [Edit]

I would recommend the web interface. Connecting to the server from a remote host is possible, but client app would have to use a username and password to do so. If the client app resides on a web browser machine (like a Java applet), it can be captured and decompiled, thus acquiring the username and password. Also, the username and password could be intercepted in transit. The best idea IMHO is to use a CGI program resident on the same machine as MySQL to interface with the database.

Posted by Renato Golin on Friday May 17 2002, @6:24am[Delete] [Edit]

You'll get crazy if you try to do the Master-Slave / Slave-Master... I can't see the point of doing it... but the H.A. for MySQL above is quite simple if you use Non-MySQL resources to do it. Like (slave-ping-master, master-is-down, slave-get-master's-name-and-IP, slave-send-email-to-sysadm)
then try to do'it with MySQL resorces...

Posted by Claudio Pucci on Friday May 17 2002, @6:24am[Delete] [Edit]

Please, add a comment for every server parameter;
is really difficult to tune a MySQL server in low memory conditions. An accurate description can be useful. A few parameters are described, a lot of them are simply reported.

Posted by Tom Howe on Friday May 17 2002, @6:24am[Delete] [Edit]

Hi, very cool stuff except for one little thing :)

Transactions dont work with replication :(

Maybe you were working on the 2 projects concurrently, or maybe you wanted to get the basics right first.

Or maybe someone forgot :(

Either way, the BEGIN, ROLLBACK and COMMIT statements are not Logged and therefore not replicated.

This means that if you do an insert on one database it is either automatically committed (autocommit on) to the other or never committed (autocommit=0). whether you commit or rollback has no effect.

Any likely hood of a fix quickly?

cheers and keep up the good work!

Posted by Carlos Fernando Scheidecker Antunes on Friday May 17 2002, @6:24am[Delete] [Edit]

The part of the manual that covers mysqldump is lacking an example with the syntax usage. For instance I have been trying to dump a table to a text CSV file with the command :
mysqldump -h localhost -u root -ppassword --field-terminated-by=';' db_parts
tbl_id > tbl_id.csv
and it gives an error saying that "mysqldump: You must use
option --tab with --fields-..."
Therefore, it is hard to get the correct syntax usage.
I hope that it fixed in the future, specialy for new users.
Thank you,
Carlos Fernando Scheidecker Antunes.

Posted by Charles Merriam on Friday May 17 2002, @6:24am[Delete] [Edit]

This section needs a couple good examples. A good SELECT .. INTO and slurp the resulting file would help. An example of the using various FIELD TERMINATED style options on the command line would be nice.

Posted by Jason Pyeron on Friday May 17 2002, @6:24am[Delete] [Edit]

# to get you started!jpyeron@pyerotechnics.com
gcc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/\"" -
DDATADIR="\"/var/lib/mysql\""
-DSHAREDIR="\"/usr/share/mysql\"" -
DHAVE_CONFIG_H -DDBUG_OFF -
I/usr/src/redhat/BUILD/mysql-
3.23.43/bdb/build_unix -
I/usr/src/redhat/BUILD/mysql-
3.23.43/innobase/include -
I/usr/src/redhat/BUILD/mysql-3.23.43/include -
I/usr/src/redhat/BUILD/mysql-3.23.43/regex -
I/usr/src/redhat/BUILD/mysql-3.23.43/sql -
I/usr/src/redhat/BUILD/mysql-3.23.43/include -
I/usr/src/redhat/BUILD/mysql-3.23.43 -O3 -felide-
constructors -fno-exceptions -fno-rtti -fno-
implicit-templates -fno-exceptions -fno-rtti -
shared -o myfile.so src src src obj src obj etc

Posted by Kavitha Subramanian on Tuesday June 24 2003, @7:32am[Delete] [Edit]

Hi Everyone,

We need to switch to MySql from MS Access. I am not able to update the date column in my recordset. I use the following :
With mDb
.CursorLocation = adUseClient
.ConnectionString = "Driver={MySQL ODBC 3.51 Driver};SERVER=;DATABASE = XXX;UID=;PWD=;option =2"
.Mode = adModeReadWrite
.Open "XXX"
End With

Dim mRS As Recordset
Set mRS = New ADODB.Recordset
mRS.CursorLocation = adUseClient

With mRS
.Source = "SELECT * From Student where StudentNo = 50"
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.ActiveConnection = mDb
End With

mRS.Open
mRS.MoveFirst
mRS("BirthDate").Value = Date
mRS.Update

It gives me this error "Row cannot be loacated for updating. Some values may have been changed since it was last read."

Has anyone come across anything like this. I am able to update other columns of type (String / VarChar / Number), But updating a date gives me this error. Please let me know if someone has come accross this situation. It will be really appreciated.

Add your own comment.