Search the MySQL manual:
MySQL Manual

Buy this Reference Manual in softcover from Barnes & Noble!

/ Next / Up / Table of Contents

A Проблемы и распространенные ошибки

В этой главе перечислены некоторые распространенные проблемы и сообщения об ошибках, с которыми приходится сталкиваться пользователям. Вы научитесь выяснять, в чем заключается проблема и что следует сделать для ее решения. Кроме того, здесь даны правильные решения некоторых распространенных проблем.

Главы

User Comments

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

To encrypt replication over an insecure (inter)net: Get stunnel and install it (after OpenSSL 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 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 on Friday May 17 2002, @6:24am [Delete] [Edit]

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

Posted by 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 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 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 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 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 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 [email protected]
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

Add your own comment.

Top / / Next / Up / Table of Contents