Which one of these two queries would be fastest?
Assuming everything is properly indexed. (1) INSERT INTO my_table_1 (field1, field2) SELECT DISTINCT field1, field2 FROM my_table_2; or (2) INSERT IGNORE INTO my_table_1 (field1, field2) SELECT field1, field2 FROM my_table_2; Is there anything to say about this in a general sense, or does it all depend on the data in question? Thanks, JP -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Fedora
Hi, in a fedora i install mysql 4, i upgrading to mysql 4, but when i put mysqld, say can´t start server: bind on tcp/ip port, before restart computer when i put ps, appear an mysql_safe but now no, with the same error. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: [MySQL] mysql/snort/webmin/permissions
Ashley M. Kirchner wrote: Mark Sargent wrote: [EMAIL PROTECTED] pcre-5.0]# mysql -h mysql -p -bash: mysql: command not found You don't have mysql in root's path. Once you fix that little problem, you should be all set. Hi All, heck, how exactly do I do that..? Move the whole mysql dir to a path dir..? Why is this so, when I followed the install steps from mysql's site. Hmm, damn annoying. Cheers. I followed the below from their install page, If you run into problems, /please always use *mysqlbug*/ when posting questions to a MySQL mailing list. Even if the problem isn't a bug, *mysqlbug* gathers system information that helps others solve your problem. By not using *mysqlbug*, you lessen the likelihood of getting a solution to your problem. You can find *mysqlbug* in the |bin| directory after you unpack the distribution. See Section 1.4.1.3, How to Report Bugs or Problems http://dev.mysql.com/doc/mysql/en/bug-reports.html. The basic commands you must execute to install and use a MySQL binary distribution are: shell groupadd mysql shell useradd -g mysql mysql shell cd /usr/local shell gunzip /|/path/to/mysql-VERSION-OS|/.tar.gz | tar xvf - shell ln -s /|full-path-to-mysql-VERSION-OS|/ mysql shell cd mysql shell scripts/mysql_install_db --user=mysql shell chown -R root . shell chown -R mysql data shell chgrp -R mysql . shell bin/mysqld_safe --user=mysql For versions of MySQL older than 4.0, substitute *bin/safe_mysqld* for *bin/mysqld_safe* in the final command. Mark Sargent. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Which one of these two queries would be fastest?
Assuming everything is properly indexed. (1) INSERT INTO my_table_1 (field1, field2) SELECT DISTINCT field1, field2 FROM my_table_2; or (2) INSERT IGNORE INTO my_table_1 (field1, field2) SELECT field1, field2 FROM my_table_2; Is there anything to say about this in a general sense, or does it all depend on the data in question? The one that runs fastest in your particular situation is the one that runs fastest in your particular situation. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL MS SQL Server Upscene Productions http://www.upscene.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL and phpMyAdmin
I just installed phpMyAdmin, made the appropriate changes in the config.inc.php file, and got the following error when accessing it via both IE and Safari on Mac OS X Panther client. #1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client I am using MySQL 4.1.10, the latest stable release, with phpMyAdmin-2.6.1-pl3, which the documentation says are compatible. Any help would be greatly appreciated. Thanks. - Asad -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL and phpMyAdmin
Did you try searching on the error message first? I got hundreds of hits in Google for this. Searching the mysql docs, the first hit http://dev.mysql.com/doc/mysql/en/old-client.html has the explanation. The short version is that password security has been improved in mysql 4.1, so clients need to be compiled against a 4.1 mysql client library to work. Your copy of php, however, is compiled against an older version of the client library (probably 3.23). You can tell mysql to accept old-style passwords (details in the documentation linked above)for one or all users, but the better solution is to fix your copy of php, either by installing a php package pre-compiled against the newer client library, or by building php from source yourself using your copy of the mysql client library. Either way, you can find directions at the php site and elsewhere. Michael Asad Habib wrote: I just installed phpMyAdmin, made the appropriate changes in the config.inc.php file, and got the following error when accessing it via both IE and Safari on Mac OS X Panther client. #1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client I am using MySQL 4.1.10, the latest stable release, with phpMyAdmin-2.6.1-pl3, which the documentation says are compatible. Any help would be greatly appreciated. Thanks. - Asad -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL and phpMyAdmin
Even I had the same problem so I moved to using SQLyog and its an awesom client. http://www.webyog.com Karam --- Asad Habib [EMAIL PROTECTED] wrote: I just installed phpMyAdmin, made the appropriate changes in the config.inc.php file, and got the following error when accessing it via both IE and Safari on Mac OS X Panther client. #1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client I am using MySQL 4.1.10, the latest stable release, with phpMyAdmin-2.6.1-pl3, which the documentation says are compatible. Any help would be greatly appreciated. Thanks. - Asad -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Replication problem
I have two servers, server5.mydomain.com and server8.mydomain.com. I want to replicate one database on server5 to server 8. I did the whole proceedure as recommended in http://dev.mysql.com/doc/mysql/en/replication-howto.html - 6.4. How to Set Up Replication I setup the GRANT statement on server5 for the slave. mysql SHOW GRANTS FOR [EMAIL PROTECTED]; +--- ---+ | Grants for [EMAIL PROTECTED] | +--- ---+ | GRANT RELOAD, SUPER, REPLICATION SLAVE ON *.* TO 'server8'@'MyServer8IP' IDENTIFIED BY PASSWORD 'xxx' | +--- ---+ 1 row in set (0.00 sec) But when I stop and start the slave, I get: 050316 8:56:42 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.04' at position 79, relay log './server8-relay-bin.01' position: 4 050316 8:56:42 [ERROR] Slave I/O thread: error connecting to master '[EMAIL PROTECTED]:3306': Error: 'Unknown MySQL server host 'server5.domain.com' (1)' errno: 2005 retry-time: 60 retries: 86400 When I try from the command line, I get it to work without problem: [EMAIL PROTECTED] mysql]# mysql -h server5.domain.com -u server8 -p Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 30 to server version: 4.1.10-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql Both /etc/my.cnf files are listed below [EMAIL PROTECTED] mysql]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock old_passwords skip-locking key_buffer = 256M max_allowed_packet = 1M table_cache = 256 sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache = 8 query_cache_size= 16M skip-networking sort_buffer=2M log-bin server-id=2 log-slave-updates log-warnings replicate-ignore-db=mysql replicate-do-db=anguillaguide [isamchk] key_buffer = 128M sort_buffer_size = 128M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 128M sort_buffer_size = 128M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [EMAIL PROTECTED] mysql]# cat /etc/my.cnf [mysqld] old-passwords max_connections = 500 key_buffer = 16M myisam_sort_buffer_size = 64M join_buffer_size = 2M read_buffer_size = 2M sort_buffer_size = 3M table_cache = 1500 thread_cache_size = 128 wait_timeout = 14400 connect_timeout = 10 max_allowed_packet = 16M max_connect_errors = 10 query_cache_limit = 1M query_cache_size = 32M query_cache_type = 1 skip-innodb log-bin=mysql-bin server-id=1 [mysqld_safe] open_files_limit = 8192 [mysqldump] quick max_allowed_packet = 16M [myisamchk] key_buffer = 64M sort_buffer = 64M read_buffer = 16M write_buffer = 16M Chris Mason Anguilla -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Newbie: mysql syntax error question
My server has mysql: version 3.23.58 // Performing SQL query SELECT cities.city, regions.region, countries.country FROM cities JOIN subnets on subnets.cityid=subnets.cityid JOIN regions on subnets.regionid=regions.regionid JOIN countries on subnets.countryid=countries.countryid where subnets.subnetaddress='24.24.172' this gives a syntax error: #1064 - You have an error in your SQL syntax near 'on subnets.cityid=subnets.cityid JOIN regions on subnets.regionid=regions.regi' at line all the tables seem proper named and populated. what could this be ? g -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Question on Unicode/UTF8
I know this issue has been brought up many times and I have tried to search and read as much as possible but still have not been able to resolve my issue. I have a mysql database (not the latest but it supports unicode). I am keeping some columns in utf8 format and only save data that is in utf8. However, when I read the data back (I am using mod_python and mysqldb module) I see characters like the following on my web page: %u0631 Now if I replace %u with #x in my python code b/f sending them to browser, everything displays fine! Am I doing something wrong in mysql side? I have just defined the encoding for the columns I want to utf8. Is there anything else I have do in MySQL to get the data from tables in the right format that is displaybed in the broswer (I set the character set to utf-8 by Apache in my http headers). I have tried many different things (including setting client or connection character set) but have not been able so far to get the data back the way I want from mysql. Or, is this the job of the python to do the conversion. I appreciate any help. -Jalil
myodbc, mysql 5.0.0-alpha
I'm having trouble compiling myodbc-3.51.11 against mysql 5.0.0 - something about int2str has too many arguments - should I be using a newer version of myodbc (I couldn't find one), or is it not supported yet for mysql 5.0.0, or ...? Running debian / linux 2.6.9-2-k7. Frederik -- http://ofb.net/~frederik/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL, Third Edition is available
MySQL, Third Edition (Sams Developers Library, 2005) has been published. More information is available at the book's Web site: http://www.kitebird.com/mysql-book/ -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Oracle to MySQl conversion
Good evening all, I've got an Oracle text dump from a client for conversion to MySQL. Before I dive into SED or Perl does anyone know of a script to convert the dump file? I did the dev site by hand, not much to it, the site is fairly simple. Mostly NUMBER to INT, VARCHAR2 to VARCHAR, and CLOB to BLOB. Just don't want to duplicate the effort. Thanks, DAve -- Dave Goodrich Systems Administrator http://www.tls.net Get rid of Unwanted Emails...get TLS Spam Blocker! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]