How to execute a file in mysql prompt
Hi, I have a file which has Creation of tables and views. How can I run the file in mysql prompt. -mysql __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to execute a file in mysql prompt
Mysql Mysql [EMAIL PROTECTED] wrote: I have a file which has Creation of tables and views. Views currently are not supported in MySQL. How can I run the file in mysql prompt. Use source (\.) command: mysql source /path/to/the/file/file.sql http://www.mysql.com/doc/en/mysql.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to Uninstall Mysql
ads mysql [EMAIL PROTECTED] wrote: I tried as advised as follows : I tried to uninstall mysql rpm as rpm -e /var/lib/mysql It gives following. [EMAIL PROTECTED] root]# rpm -e /var/lib/mysql error: package /var/lib/mysql is not installed /var/lib/mysql is not a package, it's MySQL data dir. [EMAIL PROTECTED] root]# rpm -e MySQL-server-4.0.16-0.i386.rpm error: package MySQL-server-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -e MySQL-client-4.0.16-0.i386.rpm error: package MySQL-client-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-server-4.0.16-0 is already installed [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-client-4.0.16-0 is already installed You can see which packages are installed with: rpm -qa | grep mysql [EMAIL PROTECTED] root]# /etc/init.d/mysql restart No mysqld pid file found. Looked for /var/lib/mysql/shastrihallweb.pid. [EMAIL PROTECTED] root]# Starting mysqld daemon with databases from /var/lib/mysql 031219 22:38:14 mysqld ended Since I could not Uninstall and tried to reinstall. But didn't worked out. Then tried as follows : First I moved mysql by mv /var/lib/mysql /var/lib/mysql_old Then tried mysql_install_db [EMAIL PROTECTED] root]# mysql_install_db Installing all prepared tables 031219 22:40:56 /usr/sbin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h shastrihallweb password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL = 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd / ; /usr/bin/mysqld_safe You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com [EMAIL PROTECTED] root]# mysql ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [EMAIL PROTECTED] root]# mysqld 031219 22:41:58 Can't start server: Bind on TCP/IP port: Address already in use 031219 22:41:58 Do you already have another mysqld server running on port: 3306 ? 031219 22:41:58 Aborting 031219 22:41:58 mysqld: Shutdown Complete I tried to stop running mysql as follows: [EMAIL PROTECTED] root]# /var/lib/mysql stop ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I tried to restart as follows ; [EMAIL PROTECTED] mysql]# mysql restart ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) It's confusing for me. Please guide me step by step to use mysql in this case. I tried to go through documentation but bit difficult to understand for newbe like me. Check if MySQL server is running: ps ax | grep mysqld If so, find where mysql.sock is located. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: can't start the server
Can the user the mysqld process run as (usually the mysql user) read/write the /var/lib/data directory without problems? Does your /etc/my.cnf file contain a datadir = /var/lib/mysql or is it pointing somewhere else? Did adding skip-innodb to your my.cnf solve anything? On Fri, 19 Dec 2003, landon kelsey wrote: I run safe_mysqld out of /usr with ./bin/safe_mysqld /var/log/mysqld.log 868 031219 20:52:52 mysqld started 869 Cannot initialize InnoDB as 'innodb_data_file_path' is not set. 870 If you do not want to use transactional InnoDB tables, add a line 871 skip-innodb 872 to the [mysqld] section of init parameters in your my.cnf 873 or my.ini. If you want to use InnoDB tables, add to the [mysqld] 874 section, for example, 875 innodb_data_file_path = ibdata1:10M:autoextend 876 But to get good performance you should adjust for your hardware 877 the InnoDB startup options listed in section 2 at 878 http://www.innodb.com/ibman.html 879 031219 20:52:52 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 880 031219 20:52:52 /usr/libexec/mysqld: Normal shutdown 881 882 031219 20:52:52 mysqld ended I've even tried moving host.frm around. The manual says that mysql_install_db may not have run or to try ./bin/safe_mysqld I've tried all combinations of the above. ps -ef | grep -i sql shows nothing so the server is NOT running mysql does not work ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) .. PREVIOUS HISTORY (1) performed a standard install of Redhat Linux 9 months ago (I found mysql 3.23.52 installed) I executed mysql_install_db successfully (manual says it is safe to rerun) installing all prepared tables 031219 0:44:16 /usr/libexec/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h landon password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL = 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd /usr ; /usr/bin/safe_mysqld You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; run-all-tests Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com (2) safe_mysqld produces landon (root) /usr/bin [311]safe_mysqld [1] 3247 landon (root) /usr/bin [312]Starting mysqld daemon with databases from /var/lib/mysql 031219 00:25:56 mysqld ended [1]+ Donesafe_mysqld (3) tried debug landon (root) /usr/bin [316]!305 cat /var/lib/mysql/xxx.log /usr/libexec/mysqld, Version: 3.23.52-log, started with: Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock Time Id CommandArgument (4) here is what mysql.sock looks like landon (root) /usr/bin [303]lsa /var/lib/mysql total 20 drwxr-xr-x4 mysqlmysql4096 Dec 18 23:42 ./ drwxr-xr-x 29 root root 4096 Jul 8 18:31 ../ drwx--2 root root 4096 Dec 18 21:21 mysql/ srwxrwxrwx1 mysqlmysql 0 Dec 18 23:42 mysql.sock= drwx--2 root root 4096 Dec 18 21:21 test/ -rw-rw1 mysqlmysql 156 Dec 18 22:52 xxx.log (5) also tried ./bin/safe_mysqld --user=mysql same result (6) tried safe_mysqld --debug couldn't find the mysqld.trace file (7) mysql doesn't work ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) _ Grab our best dial-up Internet access offer: 6 months @$9.95/month. http://join.msn.com/?page=dept/dialup -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: memory trap
Drago, you only had the default InnoDB buffer bool, that is 8 MB. InnoDB row locks CAN fill it in a big import if you have duplicate key errors in the inserted rowset. Also, tell us your MySQL version. Regards, Heikki - Original Message - From: [EMAIL PROTECTED] To: Heikki Tuuri [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:50 AM Subject: Re: memory trap One more thing - I had the following command issued: LOCK TABLES old WRITE; and then I try to insert 20GB (1+ Million records) of data. Drago Heikki Tuuri wrote: Hi! What MySQL version you are running? Can you show us your my.cnf, so that we see how much memory you had allocated to the InnoDB buffer pool? Did you run some big DELETE, UPDATE, or SELECT ... FOR UPDATE, or SELECT ... LOCK IN SHARE MODE query at that time, so that you could really exhaust all the memory in the buffer pool? Best regards, Heikki Innobase Oy http://www.innodb.com InnoDB - transactions, row level locking, and foreign keys for MySQL InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables Order MySQL support from http://www.mysql.com/support/index.html ... List:MySQL General Discussion« Previous MessageNext Message » From:radev at umich dot edu Date:December 19 2003 5:38am Subject:memory trap 031218 20:53:48 InnoDB: WARNING: over 4 / 5 of the buffer pool is occupied by InnoDB: lock heaps or the adaptive hash index! Check that your InnoDB: transactions do not set too many row locks. Starting InnoDB InnoDB: Monitor to print diagnostics, including lock heap and hash index InnoDB: sizes. 031218 20:53:48 InnoDB: WARNING: over 4 / 5 of the buffer pool is occupied by InnoDB: lock heaps or the adaptive hash index! Check that your InnoDB: transactions do not set too many row locks. Starting InnoDB InnoDB: Monitor to print diagnostics, including lock heap and hash index InnoDB: sizes. 031218 20:53:48 InnoDB: ERROR: over 9 / 10 of the buffer pool is occupied by InnoDB: lock heaps or the adaptive hash index! InnoDB: We intentionally generate a seg fault to print a stack trace 031218 20:53:48 InnoDB: Assertion failure in thread 10 in file buf0lru.c line 219 InnoDB: We intentionally generate a memory trap. InnoDB: Send a detailed bug report to [EMAIL PROTECTED] mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=8388600 read_buffer_size=131072 031218 20:54:11 mysqld restarted 031218 20:54:13 InnoDB: Out of memory in additional memory pool. InnoDB: InnoDB will start allocating memory from the OS. InnoDB: You may get better performance if you configure a bigger InnoDB: value in the MySQL my.cnf file for InnoDB: innodb_additional_mem_pool_size. 031218 20:54:20 InnoDB: Database was not shut down normally. InnoDB: Starting recovery from log files... InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 2898284579 InnoDB: Doing recovery: scanned up to log sequence number 0 2898284579 InnoDB: 1 transaction(s) which must be rolled back or cleaned up InnoDB: Trx id counter is 0 1792 InnoDB: Starting rollback of uncommitted transactions InnoDB: Rolling back trx with id 0 1298 -- Dragomir R. Radev [EMAIL PROTECTED] Assistant Professor of Information, Electrical Engineering and Computer Science, and Linguistics, the University of Michigan, Ann Arbor Phone: 734-615-5225 Fax: 734-764-2475http://www.si.umich.edu/~radev -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to Uninstall Mysql
I have done following as advised : [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# ps ax | grep mysqld 854 ?S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql 884 ?S 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql 8295 pts/0S 0:00 grep mysqld No response for [EMAIL PROTECTED] root]# rpm -qa | grep mysql. I will prefer to uninstall mysql since it does not have any data. Thanks for support --- Victoria Reznichenko [EMAIL PROTECTED] wrote: ads mysql [EMAIL PROTECTED] wrote: I tried as advised as follows : I tried to uninstall mysql rpm as rpm -e /var/lib/mysql It gives following. [EMAIL PROTECTED] root]# rpm -e /var/lib/mysql error: package /var/lib/mysql is not installed /var/lib/mysql is not a package, it's MySQL data dir. [EMAIL PROTECTED] root]# rpm -e MySQL-server-4.0.16-0.i386.rpm error: package MySQL-server-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -e MySQL-client-4.0.16-0.i386.rpm error: package MySQL-client-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-server-4.0.16-0 is already installed [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-client-4.0.16-0 is already installed You can see which packages are installed with: rpm -qa | grep mysql [EMAIL PROTECTED] root]# /etc/init.d/mysql restart No mysqld pid file found. Looked for /var/lib/mysql/shastrihallweb.pid. [EMAIL PROTECTED] root]# Starting mysqld daemon with databases from /var/lib/mysql 031219 22:38:14 mysqld ended Since I could not Uninstall and tried to reinstall. But didn't worked out. Then tried as follows : First I moved mysql by mv /var/lib/mysql /var/lib/mysql_old Then tried mysql_install_db [EMAIL PROTECTED] root]# mysql_install_db Installing all prepared tables 031219 22:40:56 /usr/sbin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h shastrihallweb password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL = 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd / ; /usr/bin/mysqld_safe You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com [EMAIL PROTECTED] root]# mysql ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [EMAIL PROTECTED] root]# mysqld 031219 22:41:58 Can't start server: Bind on TCP/IP port: Address already in use 031219 22:41:58 Do you already have another mysqld server running on port: 3306 ? 031219 22:41:58 Aborting 031219 22:41:58 mysqld: Shutdown Complete I tried to stop running mysql as follows: [EMAIL PROTECTED] root]# /var/lib/mysql stop ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I tried to restart as follows ; [EMAIL PROTECTED] mysql]# mysql restart ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) It's confusing for me. Please guide me step by step to use mysql in this case. I tried to go through documentation but bit difficult to understand for newbe like me. Check if MySQL server is running: ps ax | grep mysqld If so, find where mysql.sock is located. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Testing Problems
Hi! Chris == Chris Man [EMAIL PROTECTED] writes: Chris Hi, Chris We have just installed MySQL 3.23.53 on Solaris 9. We were going through the Chris testing stages and it had produced an error. Chris Pasted below is the error that we received and also attached are the logs. Chris Installing Test Databases Chris Removing Stale Files Chris Installing Master Databases Chris Installing Slave Databases Chris Starting MySQL daemon Chris Loading Standard Test Databases Chris Starting Tests cut Chris --- r/rpl15.reject Tue Dec 16 18:46:27 2003 Chris *** Chris *** 1,7 Chris File PositionBinlog_do_dbBinlog_ignore_db Chris master-bin.001 73 Chris Master_HostMaster_User Master_Port Connect_retry Log_File Chris Pos Slave_Running Replicate_do_db Replicate_ignore_db Chris Last_errno Last_error Skip_counter Chris !0 0 0 No 0 Chris 0 Chris Master_HostMaster_User Master_Port Connect_retry Log_File Chris Pos Slave_Running Replicate_do_db Replicate_ignore_db Chris Last_errno Last_error Skip_counter Chris 127.0.0.1 test999860 4 No Chris 00 Chris Master_HostMaster_User Master_Port Connect_retry Log_File Chris Pos Slave_Running Replicate_do_db Replicate_ignore_db Chris Last_errno Last_error Skip_counter Chris --- 1,7 Chris File PositionBinlog_do_dbBinlog_ignore_db Chris master-bin.001 73 Chris Master_HostMaster_User Master_Port Connect_retry Log_File Chris Pos Slave_Running Replicate_do_db Replicate_ignore_db Chris Last_errno Last_error Skip_counter Chris ! 127.0.0.1 root93061 4 No Chris 00 Chris Master_HostMaster_User Master_Port Connect_retry Log_File Chris Pos Slave_Running Replicate_do_db Replicate_ignore_db Chris Last_errno Last_error Skip_counter Chris 127.0.0.1 test999860 4 No Chris 00 Chris Master_HostMaster_User Master_Port Connect_retry Log_File Chris Pos Slave_Running Replicate_do_db Replicate_ignore_db Chris Last_errno Last_error Skip_counter The above is a timing error that only influences the test suite. you can safely skip this. In MySQL 4.0, we have done some changes to the test suite to avoid the above problem. Regards, Monty -- Michael Widenius [EMAIL PROTECTED] MySQL AB, CTO Helsinki, Finland Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
More OS X/mySQL problems
... you can tell that this isn't going my way at all ... I've got mysqld running. So, I go into the mysql shell and start setting things up again, which is when I start getting some interesting problems. Firstly, 'SHOW DATABASES' doesn't work - -- mysql SHOW DATABASES; ERROR: No query specified -- The same thing happens for 'SHOW TABLES' when you have selected a database - this is for the 'root' user. Secondly, if I try and connect to the server from a PHP script, it looks in /Private/tmp for mysql.sock, rather than /tmp. This was all going so nicely until a couple of weeks ago... now I have a contract looming over my head, it all goes to pot. -Jon --- http://www.jonpearse.net[EMAIL PROTECTED] Some people come into our lives and quickly go. Some stay for a while and leave footprints on our hearts. And we are never, ever the same. --- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Problem with sql sintax
The sql bellow is giving a sql sintax error: select cities.id, cities.name, ( select count(*) from images where ( images.city_id = cities.id ) ) as number_of_images from cities Can you point me what am I doing wrong? Thank you! Nuno -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Experiment with MySQL User Defined Functions in Java
Eric, please can you indicate how to write use an UDF in php? Thanks eric wrote: If you have a need for User Defined Functions in MySQL, now you can write them in java. (As well as C++, perl, python, or php, of course.) If you think java UDFs might be handy, please try it out and send some feed back my way. Please keep in mind that this is alpha code, so you probably don't want to test on your production data. http://freshmeat.net/projects/judf/?topic_id=66 Cheers, -- Eric Herman Seatle, WA [EMAIL PROTECTED] -- Marcelo Anelli C. Http://www.marceloanelli.com/ [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: load data in file
If the servers are on the same local subnet, why not just map a network drive so both servers have access to the file locally. -Original Message- From: Hans Kind [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 8:22 AM To: [EMAIL PROTECTED] Subject: load data in file Hi, We have a 2 server setup. 1 server runs the web server with a PHP application, the second server is the mysql database server. The php application needs to connect to the mysql server, to import data from a text file. For this we use Load Data Infile. While everything else in the application works with regard to connecting to tge mysql database, when we try to import data we are getting the following error: Can't get stat of '/upload/wachtbak_cu.txt' (Errcode: 2) We have checked, and the file is indeed uploaded to the /upload directory on the web server. However, after the connection is established with mysql database, mysql tries to find the file on the mysql server. Question is this. Is it possible to import a file into mysql, using Load Data Infile, when you have 1 web server that runs the php apllication that imports the data, and 1 mysql database server? If that's not possible, is there a way to achieve this? rgds Hans Kind -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to Uninstall Mysql
Hi, I tried as you advised. But no luck. [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# ps ax | grep mysqld 854 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql 884 ?S 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql 8406 pts/0S 0:00 grep mysqld I want to unistall mysql since thre is no data into it. Please guide me to do so in this situation.. Thanks for support. Victoria Reznichenko [EMAIL PROTECTED] wrote: ads mysql wrote: I tried as advised as follows : I tried to uninstall mysql rpm as rpm -e /var/lib/mysql It gives following. [EMAIL PROTECTED] root]# rpm -e /var/lib/mysql error: package /var/lib/mysql is not installed /var/lib/mysql is not a package, it's MySQL data dir. [EMAIL PROTECTED] root]# rpm -e MySQL-server-4.0.16-0.i386.rpm error: package MySQL-server-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -e MySQL-client-4.0.16-0.i386.rpm error: package MySQL-client-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-server-4.0.16-0 is already installed [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-client-4.0.16-0 is already installed You can see which packages are installed with: rpm -qa | grep mysql [EMAIL PROTECTED] root]# /etc/init.d/mysql restart No mysqld pid file found. Looked for /var/lib/mysql/shastrihallweb.pid. [EMAIL PROTECTED] root]# Starting mysqld daemon with databases from /var/lib/mysql 031219 22:38:14 mysqld ended Since I could not Uninstall and tried to reinstall. But didn't worked out. Then tried as follows : First I moved mysql by mv /var/lib/mysql /var/lib/mysql_old Then tried mysql_install_db [EMAIL PROTECTED] root]# mysql_install_db Installing all prepared tables 031219 22:40:56 /usr/sbin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h shastrihallweb password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL = 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd / ; /usr/bin/mysqld_safe You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com [EMAIL PROTECTED] root]# mysql ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [EMAIL PROTECTED] root]# mysqld 031219 22:41:58 Can't start server: Bind on TCP/IP port: Address already in use 031219 22:41:58 Do you already have another mysqld server running on port: 3306 ? 031219 22:41:58 Aborting 031219 22:41:58 mysqld: Shutdown Complete I tried to stop running mysql as follows: [EMAIL PROTECTED] root]# /var/lib/mysql stop ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I tried to restart as follows ; [EMAIL PROTECTED] mysql]# mysql restart ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) It's confusing for me. Please guide me step by step to use mysql in this case. I tried to go through documentation but bit difficult to understand for newbe like me. Check if MySQL server is running: ps ax | grep mysqld If so, find where mysql.sock is located. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing
Re: Is It Possible To Change the Value of A Particular Field Manually?
Carlonie, Use the UPDATE. I assume you mean by database here you mean the database table named members... if so, try the following query. UPDATE members SET user_name = 'john_doe' WHERE user_name = 'John Doe'; -- MikemickaloBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Quality Web Hosting http://www.justlightening.net MSN: [EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Caroline Jen wrote: Hi, I am not a database person. I have a database called members. One of the fields in this database is user_name. There are a number of records in this database. Under the field user_name, I would like to make some changes manually; for example, I want to change John Doe to john_doe Is it possible to do it? How do I do it? Thank you very much in advance. __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to Uninstall Mysql
This is what we did. root [~] #rpm -qa | grep MySQL MySQL-client-4.0.15-0 MySQL-embedded-4.0.15-0 MySQL-devel-4.0.15-0 MySQL-shared-compat-4.0.15-0 MySQL-shared-4.0.15-0 MySQL-server-4.0.15-0 # Now remove the RPM's rpm -e --nodeps MySQL-server-4.0.15-0 rpm -e --nodeps MySQL-embedded-4.0.15-0 rpm -e --nodeps MySQL-devel-4.0.15-0 rpm -e --nodeps MySQL-shared-4.0.15-0 rpm -e --nodeps MySQL-shared-compat-4.0.15-0 rpm -e --nodeps MySQL-client-4.0.15-0 this should remove MySQL without any problems. hope it helps, -- MikemickaloBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Quality Web Hosting http://www.justlightening.net MSN: [EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ads mysql wrote: Hi, I tried as you advised. But no luck. [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# ps ax | grep mysqld 854 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql 884 ?S 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql 8406 pts/0S 0:00 grep mysqld I want to unistall mysql since thre is no data into it. Please guide me to do so in this situation.. Thanks for support. Victoria Reznichenko [EMAIL PROTECTED] wrote: ads mysql wrote: I tried as advised as follows : I tried to uninstall mysql rpm as rpm -e /var/lib/mysql It gives following. [EMAIL PROTECTED] root]# rpm -e /var/lib/mysql error: package /var/lib/mysql is not installed /var/lib/mysql is not a package, it's MySQL data dir. [EMAIL PROTECTED] root]# rpm -e MySQL-server-4.0.16-0.i386.rpm error: package MySQL-server-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -e MySQL-client-4.0.16-0.i386.rpm error: package MySQL-client-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-server-4.0.16-0 is already installed [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-client-4.0.16-0 is already installed You can see which packages are installed with: rpm -qa | grep mysql [EMAIL PROTECTED] root]# /etc/init.d/mysql restart No mysqld pid file found. Looked for /var/lib/mysql/shastrihallweb.pid. [EMAIL PROTECTED] root]# Starting mysqld daemon with databases from /var/lib/mysql 031219 22:38:14 mysqld ended Since I could not Uninstall and tried to reinstall. But didn't worked out. Then tried as follows : First I moved mysql by mv /var/lib/mysql /var/lib/mysql_old Then tried mysql_install_db [EMAIL PROTECTED] root]# mysql_install_db Installing all prepared tables 031219 22:40:56 /usr/sbin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h shastrihallweb password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL = 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd / ; /usr/bin/mysqld_safe You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com [EMAIL PROTECTED] root]# mysql ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [EMAIL PROTECTED] root]# mysqld 031219 22:41:58 Can't start server: Bind on TCP/IP port: Address already in use 031219 22:41:58 Do you already have another mysqld server running on port: 3306 ? 031219 22:41:58 Aborting 031219 22:41:58 mysqld: Shutdown Complete I tried to stop running mysql as follows: [EMAIL PROTECTED] root]# /var/lib/mysql stop ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I tried to restart as follows ; [EMAIL PROTECTED] mysql]# mysql restart ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) It's confusing for me. Please guide me step by step to use mysql in this case. I tried to go through documentation but bit difficult to understand for newbe like me. Check if MySQL server is running: ps ax | grep mysqld If so, find where mysql.sock is located. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problem with sql sintax
What version you using? Subselects are not supported in any except the latest Nuno Mendes wrote: The sql bellow is giving a sql sintax error: select cities.id, cities.name, ( select count(*) from images where ( images.city_id = cities.id ) ) as number_of_images from cities Can you point me what am I doing wrong? Thank you! Nuno -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to Uninstall Mysql
Yes I could uninstall mysql with rpm -qa | grep MySQL (MYSQL should be in Uppercase. I tried same with lower case earlier) Therefore has not worked. Anyway Thanks lot. I once again tried to install myssql with [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 [EMAIL PROTECTED] root]# /usr/bin/mysqladmin -u root password 'adsh1956' /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! Some more help is needed. Thanks for support. --- Mike Blezien [EMAIL PROTECTED] wrote: This is what we did. root [~] #rpm -qa | grep MySQL MySQL-client-4.0.15-0 MySQL-embedded-4.0.15-0 MySQL-devel-4.0.15-0 MySQL-shared-compat-4.0.15-0 MySQL-shared-4.0.15-0 MySQL-server-4.0.15-0 # Now remove the RPM's rpm -e --nodeps MySQL-server-4.0.15-0 rpm -e --nodeps MySQL-embedded-4.0.15-0 rpm -e --nodeps MySQL-devel-4.0.15-0 rpm -e --nodeps MySQL-shared-4.0.15-0 rpm -e --nodeps MySQL-shared-compat-4.0.15-0 rpm -e --nodeps MySQL-client-4.0.15-0 this should remove MySQL without any problems. hope it helps, -- MikemickaloBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Quality Web Hosting http://www.justlightening.net MSN: [EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ads mysql wrote: Hi, I tried as you advised. But no luck. [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# ps ax | grep mysqld 854 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql 884 ?S 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql 8406 pts/0S 0:00 grep mysqld I want to unistall mysql since thre is no data into it. Please guide me to do so in this situation.. Thanks for support. Victoria Reznichenko [EMAIL PROTECTED] wrote: ads mysql wrote: I tried as advised as follows : I tried to uninstall mysql rpm as rpm -e /var/lib/mysql It gives following. [EMAIL PROTECTED] root]# rpm -e /var/lib/mysql error: package /var/lib/mysql is not installed /var/lib/mysql is not a package, it's MySQL data dir. [EMAIL PROTECTED] root]# rpm -e MySQL-server-4.0.16-0.i386.rpm error: package MySQL-server-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -e MySQL-client-4.0.16-0.i386.rpm error: package MySQL-client-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-server-4.0.16-0 is already installed [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-client-4.0.16-0 is already installed You can see which packages are installed with: rpm -qa | grep mysql [EMAIL PROTECTED] root]# /etc/init.d/mysql restart No mysqld pid file found. Looked for /var/lib/mysql/shastrihallweb.pid. [EMAIL PROTECTED] root]# Starting mysqld daemon with databases from /var/lib/mysql 031219 22:38:14 mysqld ended Since I could not Uninstall and tried to reinstall. But didn't worked out. Then tried as follows : First I moved mysql by mv /var/lib/mysql /var/lib/mysql_old Then tried mysql_install_db [EMAIL PROTECTED] root]# mysql_install_db Installing all prepared tables 031219 22:40:56 /usr/sbin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h shastrihallweb password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL = 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd / ; /usr/bin/mysqld_safe You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com [EMAIL PROTECTED] root]# mysql ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [EMAIL PROTECTED] root]# mysqld 031219 22:41:58
Re: How to Uninstall Mysql
Yes I could uninstall mysql with rpm -qa | grep MySQL (MYSQL should be in Uppercase. I tried same with lower case earlier) Therefore has not worked. Anyway Thanks lot. I once again tried to install myssql with [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 [EMAIL PROTECTED] root]# /usr/bin/mysqladmin -u root password 'adsh1956' /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! Some more help is needed. Thanks for support. --- Mike Blezien [EMAIL PROTECTED] wrote: This is what we did. root [~] #rpm -qa | grep MySQL MySQL-client-4.0.15-0 MySQL-embedded-4.0.15-0 MySQL-devel-4.0.15-0 MySQL-shared-compat-4.0.15-0 MySQL-shared-4.0.15-0 MySQL-server-4.0.15-0 # Now remove the RPM's rpm -e --nodeps MySQL-server-4.0.15-0 rpm -e --nodeps MySQL-embedded-4.0.15-0 rpm -e --nodeps MySQL-devel-4.0.15-0 rpm -e --nodeps MySQL-shared-4.0.15-0 rpm -e --nodeps MySQL-shared-compat-4.0.15-0 rpm -e --nodeps MySQL-client-4.0.15-0 this should remove MySQL without any problems. hope it helps, -- MikemickaloBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Quality Web Hosting http://www.justlightening.net MSN: [EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ads mysql wrote: Hi, I tried as you advised. But no luck. [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# ps ax | grep mysqld 854 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql 884 ?S 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql 8406 pts/0S 0:00 grep mysqld I want to unistall mysql since thre is no data into it. Please guide me to do so in this situation.. Thanks for support. Victoria Reznichenko [EMAIL PROTECTED] wrote: ads mysql wrote: I tried as advised as follows : I tried to uninstall mysql rpm as rpm -e /var/lib/mysql It gives following. [EMAIL PROTECTED] root]# rpm -e /var/lib/mysql error: package /var/lib/mysql is not installed /var/lib/mysql is not a package, it's MySQL data dir. [EMAIL PROTECTED] root]# rpm -e MySQL-server-4.0.16-0.i386.rpm error: package MySQL-server-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -e MySQL-client-4.0.16-0.i386.rpm error: package MySQL-client-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-server-4.0.16-0 is already installed [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-client-4.0.16-0 is already installed You can see which packages are installed with: rpm -qa | grep mysql [EMAIL PROTECTED] root]# /etc/init.d/mysql restart No mysqld pid file found. Looked for /var/lib/mysql/shastrihallweb.pid. [EMAIL PROTECTED] root]# Starting mysqld daemon with databases from /var/lib/mysql 031219 22:38:14 mysqld ended Since I could not Uninstall and tried to reinstall. But didn't worked out. Then tried as follows : First I moved mysql by mv /var/lib/mysql /var/lib/mysql_old Then tried mysql_install_db [EMAIL PROTECTED] root]# mysql_install_db Installing all prepared tables 031219 22:40:56 /usr/sbin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h shastrihallweb password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL = 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd / ; /usr/bin/mysqld_safe You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com [EMAIL PROTECTED] root]# mysql ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [EMAIL PROTECTED] root]# mysqld 031219 22:41:58
RE: Problem with sql sintax
I'm using 4.0.17. Isn't this SQL supported in this version? Nuno Mendes -Original Message- From: Colleen Dick Sent: Saturday, December 20, 2003 3:15 PM To: Nuno Mendes Cc: [EMAIL PROTECTED] Subject: Re: Problem with sql sintax What version you using? Subselects are not supported in any except the latest Nuno Mendes wrote: The sql bellow is giving a sql sintax error: select cities.id, cities.name, ( select count(*) from images where ( images.city_id = cities.id ) ) as number_of_images from cities Can you point me what am I doing wrong? Thank you! Nuno -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
jUDDI DataSource Connection Problem (Cannot create PoolableConnectionFactory)
happyjuddi.jsp gives me the following error: (full text of the page enclosed at end of message) jUDDI DataSource Check + Got a JNDI Context!+ Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB)- DB connection was not aquired. (Cannot create PoolableConnectionFactory)- SELECT COUNT(*) FROM PUBLISHER failed (null)I am using the latest versions of the respective software (Tomcat 5.0.16, jUDDI 0.8.0, MySQL 4.0.17, Java SDK j2sdk1.4.2.03, JDBC driver mysql-connector-java-3.0.9-stable-bin.jar) on Windows 2000. I have tried setting juddi.useConnectionPool to True but that didn't resolve the issue. I have followed the instructions in a couple of archived messages I unearthed on this problem; but nothing seems to work for me. Thanks for any suggestions/help. -- Ramesh [EMAIL PROTECTED] the happyjuddi.jsp output page - jUDDI Happiness PagejUDDI.org jUDDI Happy jUDDI! jUDDI Dependencies: Class Files Libraries Looking for: org.juddi.registry.Registry +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\juddi.jar Looking for: javax.xml.soap.SOAPMessage +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\saaj.jar Looking for: javax.xml.rpc.Service +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\jaxrpc.jar Looking for: org.apache.axis.transport.http.AxisServlet +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\axis.jar Looking for: org.apache.commons.discovery.Resource +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\commons-discovery.jar Looking for: org.apache.commons.logging.Log +Found in: c:\jakarta-tomcat-5.0.16\bin\commons-logging-api.jar Looking for: org.apache.log4j.Layout +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\log4j-1.2.8.jar Looking for: com.ibm.wsdl.factory.WSDLFactoryImpl +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\wsdl4j.jar Looking for: javax.xml.parsers.SAXParserFactory +Found in an unknown location Looking for: javax.activation.DataHandler +Found in: c:\jakarta-tomcat-5.0.16\common\lib\activation.jar jUDDI Dependencies: Resource Properties Files Looking for: log4j.properties +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\classes\log4j.properties Looking for: juddi.properties +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\classes\juddi.properties jUDDI DataSource Check + Got a JNDI Context! + Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB) - DB connection was not aquired. (Cannot create PoolableConnectionFactory) - SELECT COUNT(*) FROM PUBLISHER failed (null) jUDDI Properties juddi.adminEmailAddress: [EMAIL PROTECTED] juddi.adminURL: http://localhost:8080/juddi/admin juddi.authFactory: org.juddi.auth.simple.SimpleAuthenticatorFactory juddi.dataSource: java:comp/env/jdbc/juddiDB juddi.dataStoreFactory: org.juddi.datastore.jdbc.JDBCDataStoreFactory juddi.inquiryURL: http://localhost:8080/juddi/inquiry juddi.jdbcDriver: com.mysql.jdbc.Driver juddi.jdbcPassword: juddi juddi.jdbcURL: jdbc:mysql://localhost/juddi juddi.jdbcUser: juddi juddi.maxMessageSize: 2097152 juddi.maxNameElementsAllowed: 5 juddi.maxNameLength: 255 juddi.operatorName: jUDDI.org juddi.operatorSiteURL: http://localhost:8080/juddi juddi.publishURL: http://localhost:8080/juddi/publish juddi.transportClass: org.juddi.transport.axis.AxisTransport juddi.useConnectionPool: false juddi.uuidgenFactory: org.juddi.uuidgen.jvm.JavaUUIDGenFactory Platform: Apache Tomcat/5.0.16 - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing
Re: How to Uninstall Mysql
Am Saturday 20 December 2003 17:21 schrieb ads mysql: Yes I could uninstall mysql with rpm -qa | grep MySQL (MYSQL should be in Uppercase. I tried same with lower case earlier) Therefore has not worked. Anyway Thanks lot. I once again tried to install myssql with [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 At this point, you need to start the sever. Did you do this? (/etc/init.d/mysql start) [EMAIL PROTECTED] root]# /usr/bin/mysqladmin -u root password 'adsh1956' /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! Some more help is needed. Thanks for support. --- Mike Blezien [EMAIL PROTECTED] wrote: This is what we did. root [~] #rpm -qa | grep MySQL MySQL-client-4.0.15-0 MySQL-embedded-4.0.15-0 MySQL-devel-4.0.15-0 MySQL-shared-compat-4.0.15-0 MySQL-shared-4.0.15-0 MySQL-server-4.0.15-0 # Now remove the RPM's rpm -e --nodeps MySQL-server-4.0.15-0 rpm -e --nodeps MySQL-embedded-4.0.15-0 rpm -e --nodeps MySQL-devel-4.0.15-0 rpm -e --nodeps MySQL-shared-4.0.15-0 rpm -e --nodeps MySQL-shared-compat-4.0.15-0 rpm -e --nodeps MySQL-client-4.0.15-0 this should remove MySQL without any problems. hope it helps, -- MikemickaloBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Quality Web Hosting http://www.justlightening.net MSN: [EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ads mysql wrote: Hi, I tried as you advised. But no luck. [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# rpm -qa | grep mysql [EMAIL PROTECTED] root]# ps ax | grep mysqld 854 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql 884 ?S 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql 8406 pts/0S 0:00 grep mysqld I want to unistall mysql since thre is no data into it. Please guide me to do so in this situation.. Thanks for support. Victoria Reznichenko [EMAIL PROTECTED] wrote: ads mysql wrote: I tried as advised as follows : I tried to uninstall mysql rpm as rpm -e /var/lib/mysql It gives following. [EMAIL PROTECTED] root]# rpm -e /var/lib/mysql error: package /var/lib/mysql is not installed /var/lib/mysql is not a package, it's MySQL data dir. [EMAIL PROTECTED] root]# rpm -e MySQL-server-4.0.16-0.i386.rpm error: package MySQL-server-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -e MySQL-client-4.0.16-0.i386.rpm error: package MySQL-client-4.0.16-0.i386.rpm is not installed [EMAIL PROTECTED] root]# rpm -i MySQL-server-4.0.16-0.i386.rpm warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-server-4.0.16-0 is already installed [EMAIL PROTECTED] root]# rpm -i MySQL-client-4.0.16-0.i386.rpm warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 package MySQL-client-4.0.16-0 is already installed You can see which packages are installed with: rpm -qa | grep mysql [EMAIL PROTECTED] root]# /etc/init.d/mysql restart No mysqld pid file found. Looked for /var/lib/mysql/shastrihallweb.pid. [EMAIL PROTECTED] root]# Starting mysqld daemon with databases from /var/lib/mysql 031219 22:38:14 mysqld ended Since I could not Uninstall and tried to reinstall. But didn't worked out. Then tried as follows : First I moved mysql by mv /var/lib/mysql /var/lib/mysql_old Then tried mysql_install_db [EMAIL PROTECTED] root]# mysql_install_db Installing all prepared tables 031219 22:40:56 /usr/sbin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h shastrihallweb password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL = 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd / ; /usr/bin/mysqld_safe You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the
Oracle date
sql from Oracle insert into log_book values (TO_DATE('08/12/1973','MM/dd/'),'C150','N5787G',1,1.8); would like insert into log_book values (STR_TO_DATE('08-12-1973','%m-%d-%Y'),'C150','N5787G',1,1.8); according to the manual, STR_TO_DATE is not until 4.0...I have 3.23.52 hate to write a program to change the format on 500 insert statements any suggestions _ Enjoy the holiday season with great tips from MSN. http://special.msn.com/network/happyholidays.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Problem with sql sintax
You're trying to do a Sub-query, Sub-queries aren't supported until version 4.1.x You could do a simple join/group to get these results: SELECT cities.id, cities.name, COUNT(images.city_id) as number_of_images FROM cities LEFT JOIN images ON(images.city_id = cities.id) GROUP BY cities.id -Original Message- From: Nuno Mendes [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 8:28 AM To: [EMAIL PROTECTED] Subject: RE: Problem with sql sintax I'm using 4.0.17. Isn't this SQL supported in this version? Nuno Mendes -Original Message- From: Colleen Dick Sent: Saturday, December 20, 2003 3:15 PM To: Nuno Mendes Cc: [EMAIL PROTECTED] Subject: Re: Problem with sql sintax What version you using? Subselects are not supported in any except the latest Nuno Mendes wrote: The sql bellow is giving a sql sintax error: select cities.id, cities.name, ( select count(*) from images where ( images.city_id = cities.id ) ) as number_of_images from cities Can you point me what am I doing wrong? Thank you! Nuno -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql load_file retreival
I have set up a script to recieve a pdf file and store it in a mysql db using update db set field=load_file('fileIncludingFile') where id=$id. Afterwards I can see the file has been uploaded into the blob field successfully and without errors. Now I want to get the file back out. I set up a script with select field from db where id=$id and used mysql_query followed by mysql_fetch_row and did echo header(Content-type: application/pdf); and then echo result[0]; where result was the row fetched. I get the prompt to open with pdf but pdf fails. I have magicquotes on but I understand that the load_file() function within mysql does the escaping etc. How can I un-escape the data? The only thing I saw on the mysql manual is on how to use load_file_infile/load_file_outfile which does not apply to this. Can someone lend a hand here? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Experiment with MySQL User Defined Functions in Java
On Sat, 2003-12-20 at 06:32, Marcelo Anelli wrote: Eric, please can you indicate how to write use an UDF in php? David Sklar wrote it, I have not used it. http://www.sklar.com/page/section/projects Cheers, -- eric Thanks eric wrote: If you have a need for User Defined Functions in MySQL, now you can write them in java. (As well as C++, perl, python, or php, of course.) If you think java UDFs might be handy, please try it out and send some feed back my way. Please keep in mind that this is alpha code, so you probably don't want to test on your production data. http://freshmeat.net/projects/judf/?topic_id=66 Cheers, -- Eric Herman Seatle, WA [EMAIL PROTECTED] -- Marcelo Anelli C. Http://www.marceloanelli.com/ [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Oracle date
The kind of processing you desired is easily accomplisches with the following perl program: #!/usr/bin/perl while (STDIN) { if (/TO_DATE/) { s/TO_DATE/STR_TO_DATE/; s/(..)\/(..)\/()/$1-$2-$3/; s/MM\/dd\//%m-%d-%Y/; } print $_; } [EMAIL PROTECTED] cat Landon.odat insert into log_book values (TO_DATE('08/12/1973','MM/dd/'),'C150','N5787G',1,1.8); [EMAIL PROTECTED] ./Landon.pl Landon.odat insert into log_book values (STR_TO_DATE('08-12-1973','%m-%d-%Y'),'C150','N5787G',1,1.8); Brad Eacker ([EMAIL PROTECTED]) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL runs slow on windows 2003
At 09:18 AM 12/19/2003, you wrote: Hello, I have upgraded win 2000 to 2003 and since this moment, MySQL 4.0.17 run very slow. CPU usage is always between 60 to 100%. Where i can found a solution ? Thanks a lot. Rezo, I remember reading threads where several others have had a slowdown with MySQL when they switched from Win2k to Windows Server 2003. I'm not sure what the solution is. But if you search the newsgroups you should be able to find a solution. Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: jUDDI DataSource Connection Problem (Cannot create PoolableConnectionFactory)
Thanks to those that responded. The problem is solved there was a password mismatch between MySQL (what I had set up) and jUDDI. I changed the password in MySQL and it now works fine. BTW, to the person that asked, Axis worked fine all along. VC Ramesh [EMAIL PROTECTED] wrote: happyjuddi.jsp gives me the following error: (full text of the page enclosed at end of message) jUDDI DataSource Check + Got a JNDI Context!+ Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB)- DB connection was not aquired. (Cannot create PoolableConnectionFactory)- SELECT COUNT(*) FROM PUBLISHER failed (null)I am using the latest versions of the respective software (Tomcat 5.0.16, jUDDI 0.8.0, MySQL 4.0.17, Java SDK j2sdk1.4.2.03, JDBC driver mysql-connector-java-3.0.9-stable-bin.jar) on Windows 2000. I have tried setting juddi.useConnectionPool to True but that didn't resolve the issue. I have followed the instructions in a couple of archived messages I unearthed on this problem; but nothing seems to work for me. Thanks for any suggestions/help. -- Ramesh [EMAIL PROTECTED] the happyjuddi.jsp output page - jUDDI Happiness PagejUDDI.org jUDDI Happy jUDDI! jUDDI Dependencies: Class Files Libraries Looking for: org.juddi.registry.Registry +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\juddi.jar Looking for: javax.xml.soap.SOAPMessage +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\saaj.jar Looking for: javax.xml.rpc.Service +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\jaxrpc.jar Looking for: org.apache.axis.transport.http.AxisServlet +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\axis.jar Looking for: org.apache.commons.discovery.Resource +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\commons-discovery.jar Looking for: org.apache.commons.logging.Log +Found in: c:\jakarta-tomcat-5.0.16\bin\commons-logging-api.jar Looking for: org.apache.log4j.Layout +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\log4j-1.2.8.jar Looking for: com.ibm.wsdl.factory.WSDLFactoryImpl +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\lib\wsdl4j.jar Looking for: javax.xml.parsers.SAXParserFactory +Found in an unknown location Looking for: javax.activation.DataHandler +Found in: c:\jakarta-tomcat-5.0.16\common\lib\activation.jar jUDDI Dependencies: Resource Properties Files Looking for: log4j.properties +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\classes\log4j.properties Looking for: juddi.properties +Found in: c:\jakarta-tomcat-5.0.16\webapps\juddi\WEB-INF\classes\juddi.properties jUDDI DataSource Check + Got a JNDI Context! + Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB) - DB connection was not aquired. (Cannot create PoolableConnectionFactory) - SELECT COUNT(*) FROM PUBLISHER failed (null) jUDDI Properties juddi.adminEmailAddress: [EMAIL PROTECTED] juddi.adminURL: http://localhost:8080/juddi/admin juddi.authFactory: org.juddi.auth.simple.SimpleAuthenticatorFactory juddi.dataSource: java:comp/env/jdbc/juddiDB juddi.dataStoreFactory: org.juddi.datastore.jdbc.JDBCDataStoreFactory juddi.inquiryURL: http://localhost:8080/juddi/inquiry juddi.jdbcDriver: com.mysql.jdbc.Driver juddi.jdbcPassword: juddi juddi.jdbcURL: jdbc:mysql://localhost/juddi juddi.jdbcUser: juddi juddi.maxMessageSize: 2097152 juddi.maxNameElementsAllowed: 5 juddi.maxNameLength: 255 juddi.operatorName: jUDDI.org juddi.operatorSiteURL: http://localhost:8080/juddi juddi.publishURL: http://localhost:8080/juddi/publish juddi.transportClass: org.juddi.transport.axis.AxisTransport juddi.useConnectionPool: false juddi.uuidgenFactory: org.juddi.uuidgen.jvm.JavaUUIDGenFactory Platform: Apache Tomcat/5.0.16 - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing
Re: MySQL runs slow on windows 2003
Thanks for you help, i have already check on google and i dont have found any solution. At 22:12 20/12/2003, mos wrote: At 09:18 AM 12/19/2003, you wrote: Hello, I have upgraded win 2000 to 2003 and since this moment, MySQL 4.0.17 run very slow. CPU usage is always between 60 to 100%. Where i can found a solution ? Thanks a lot. Rezo, I remember reading threads where several others have had a slowdown with MySQL when they switched from Win2k to Windows Server 2003. I'm not sure what the solution is. But if you search the newsgroups you should be able to find a solution. Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Any one can drop a table or database
Hi, I am new to mysql. I have installed, created a database and also some created tables. Now any one who can login to the host are able to drop the table or also the database. How do I protect it? -mysql - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing
Newbie question: how to change the mysql password
Hello everyone, I'm new to mysql so please forgive the basic question. I'm running redhat 8.0 with Mysql 4. The install was done with the mysql user. However every time I try to get access, I get denied. Can someone tell me how to change the password? Thanks, James -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL bogging down
Running MySQL (mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)) on RedHat 9, and running into a rather serious (for me) problem. Pretty much every business day, mysqld will at some point start to take forever to finish queries. During this time, it uses tons of swap and only 30 or so megs of real memory is in use by mysqld. Around 35 Megs of real RAM is reported as free at the time (I assume the rest is buffers as killing mysqld will have little effect on the total amount of real memory free). The only way to fix this is to restart the server. The feeling I get is it prefers to use swap rather than real memory. In my opinion there's no reason for it to be using swap ever. I'm using the my-medium.cnf and the server has 1 gig of RAM. 'free' (with mysqld freshly restarted) shows: total usedfreeshared buffers cached Mem 1030672 994620 36052 0 247192 683636 -/+ buffers/cache: 63792 966880 Swap: 1020116 22104 998012 I don't currently have a 'free' output for when the server is swapping. I've considered the possibility of this RedHat version of MySQL being bad (I believe his has happened before), but I didn't find anything through my searches of Google. The load on this server is relatively light. The database itself is only 92 Megs and it averages 0.5 queries a second. Prior to these problems, this database was running in production without issue for a good 3 months. Recently the load has increased, but only from .3 to .5 queries a second. Anyone have any ideas on where I should start looking? Thanks, Chris -- Chris Cameron UpNIX Internet Administrator ardvark.upnix.net bitbucket.upnix.net -- http://www.upnix.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Newbie question: how to change the mysql password
You need to set up the initial privileges. Just follow the directions here: http://www.mysql.com/doc/en/Default_privileges.html Note: you shouldn't need to run mysql_install_db if you installed the rpm. (I think) -Original Message- From: James Marcinek [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 8:53 PM To: [EMAIL PROTECTED] Subject: Newbie question: how to change the mysql password Hello everyone, I'm new to mysql so please forgive the basic question. I'm running redhat 8.0 with Mysql 4. The install was done with the mysql user. However every time I try to get access, I get denied. Can someone tell me how to change the password? Thanks, James -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Auto_increment question
I have two tables with a one to many relationship: boys and their toys. I want to know if there are any advantages or disadvantages for each of the following two ways to create the tables. I am mainly interested in performance. Either way the insert and select queries aren't any more difficult than the other way. CREATE TABLE boy ( BoyID INT NOT NULL AUTO_INCREMENT, name CHAR(30) NOT NULL, PRIMARY KEY (BoyID) ); CREATE TABLE toy ( BoyID INT NOT NULL, ToyID INT NOT NULL AUTO_INCREMENT, name CHAR(30) NOT NULL, PRIMARY KEY (BoyID,ToyID) ); OR #no change here CREATE TABLE boy ( BoyID INT NOT NULL AUTO_INCREMENT, name CHAR(30) NOT NULL, PRIMARY KEY (BoyID) ); #slight change here CREATE TABLE toy ( ToyID INT NOT NULL AUTO_INCREMENT, BoyID INT NOT NULL, name CHAR(30) NOT NULL, PRIMARY KEY (ToyID) ); Chris W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
4.0.17 compilation fails during link phase on SCO OpenServer 5.0.7
mysql 4.0.17 compilation fails during link phase, apparently due to problems with libgthreads.so, one of the FSU pthreads libs. mysql 4.0.16 compiles and runs without error. SCO OpenServer 5.0.7 with maintenance and subscription SCO Update patches GNU Development Tools 5.0.7Kj FSU Pthreads 3.9 (as custom package from skunkware) Output from make: mkdir .libs gcc -O3 -DDBUG_OFF -DSCO -o test_thr_alarm -DDEFAULT_BASEDIR=\/u/david/mysql\ -DDATADIR=\/u/david/mysql/var\ -DDEFAULT_CHARSET_HOME=\/u/david/mysql\ -DSHA REDIR=\/u/david/mysql/share/mysql\ -DHAVE_CONFIG_H -I./../include -I../include -I.. -I. -O3 -DDBUG_OFF -DSCO -DMAIN ./test_thr_alarm.c libmysys.a ../dbug/lib dbug.a ../strings/libmystrings.a -lgthreads -lsocket -lgthreads /usr/lib/libz.so -lcrypt -lm -lgthreads -lsocket -lgthreads WARNING: no SCO ELF identifying .note section in file 'libgthreads.so' Undefined first referenced symbol in file pthread_key_delete libmysys.a(my_thr_init.o) ERROR: Symbol referencing errors. No output written to test_thr_alarm collect2: ld returned 1 exit status make[2]: *** [test_thr_alarm] Error 1 make[2]: Leaving directory `/u/david/mysql-4.0.17/mysys' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/u/david/mysql-4.0.17' make: *** [all] Error 2 Thanks, David P. Lurie -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
4.0.17 compilation fails during link phase on SCO OpenServer 5.0.7
mysql 4.0.17 compilation fails during link phase, apparently due to problems with libgthreads.so, one of the FSU pthreads libs. mysql 4.0.16 compiles and runs without error. SCO OpenServer 5.0.7 with maintenance and subscription SCO Update patches GNU Development Tools 5.0.7Kj FSU Pthreads 3.9 (as custom package from skunkware) Output from make: mkdir .libs gcc -O3 -DDBUG_OFF -DSCO -o test_thr_alarm -DDEFAULT_BASEDIR=\/u/david/mysql\ -DDATADIR=\/u/david/mysql/var\ -DDEFAULT_CHARSET_HOME=\/u/david/mysql\ -DSHA REDIR=\/u/david/mysql/share/mysql\ -DHAVE_CONFIG_H -I./../include -I../include -I.. -I. -O3 -DDBUG_OFF -DSCO -DMAIN ./test_thr_alarm.c libmysys.a ../dbug/lib dbug.a ../strings/libmystrings.a -lgthreads -lsocket -lgthreads /usr/lib/libz.so -lcrypt -lm -lgthreads -lsocket -lgthreads WARNING: no SCO ELF identifying .note section in file 'libgthreads.so' Undefined first referenced symbol in file pthread_key_delete libmysys.a(my_thr_init.o) ERROR: Symbol referencing errors. No output written to test_thr_alarm collect2: ld returned 1 exit status make[2]: *** [test_thr_alarm] Error 1 make[2]: Leaving directory `/u/david/mysql-4.0.17/mysys' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/u/david/mysql-4.0.17' make: *** [all] Error 2 Thanks, David P. Lurie -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: two tables
debug, is there any difference between: a) select lname, fname from person_tb, details_tb where mem_id = det_id and fin = y; and b) select lname, fname from person_tb where mem_id in (select det_id from details_tb where fin = y) Yes, the first does give error free output. The second says ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select det_id from details_tb where fin = y)' at line 3 which one will execute faster ? The first. Regards Trevor Rhodes === Powered by Linux- Mandrake 9.2 Registered Linux user # 290542 at http://counter.li.org Registered Machine #'s 186951 Mandrake Club Silver Member Source : my 100 % Microsoft-free personal computer. === 16:10:15 up 38 min, 1 user, load average: 1.00, 1.07, 1.06 -- Never mud wrestle with a pig.. you get dirty and the pig enjoys it! Never try to teach a pig to dance. You waste your time and annoy the pig. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: two tables
Hello All, person_tb contains mem_id, lname and fname details_tb contains det_id and fin. They both contain other fields, but I don't care about them at this time. I'm trying the following select lname, fname from person_tb, details_tb where mem_id = det_id and fin = y; but it is giving me all 103 rows instead of just the ones I need. How is it to know which ones you need? Add that logic to the where clause. Do you mean like: where person_tb.mem_id = details_tb.det_id and details_tb.fin = y; ? If so, then it gave me the whole 103 as well. An example would be much more useful than a vague description. Cut the data down to a smaller set and show us the problem. person_tb mem_id lname fname 001 Smith Terry 002 Jones Larry 003 Barfbag Harry details_tb det_id fin 001 y 002 n 003 y I'm trying to get Smith and Barfbag to show up instead of all three. Regards Trevor Rhodes === Powered by Linux- Mandrake 9.2 Registered Linux user # 290542 at http://counter.li.org Registered Machine #'s 186951 Mandrake Club Silver Member Source : my 100 % Microsoft-free personal computer. === 16:12:07 up 40 min, 1 user, load average: 1.23, 1.18, 1.10 -- Never mud wrestle with a pig.. you get dirty and the pig enjoys it! Never try to teach a pig to dance. You waste your time and annoy the pig. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: load data in file
Hi, I was looking to solution of same problem as Hans Kind. You have suggested to map network drive. Is it O.K.if SAMBA is ruuning on main server. Or can you guide to Documentation for mapping on Linux. I know it is out of topic but it will help me great. Thanks --- Larry Brown [EMAIL PROTECTED] wrote: If the servers are on the same local subnet, why not just map a network drive so both servers have access to the file locally. -Original Message- From: Hans Kind [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 8:22 AM To: [EMAIL PROTECTED] Subject: load data in file Hi, We have a 2 server setup. 1 server runs the web server with a PHP application, the second server is the mysql database server. The php application needs to connect to the mysql server, to import data from a text file. For this we use Load Data Infile. While everything else in the application works with regard to connecting to tge mysql database, when we try to import data we are getting the following error: Can't get stat of '/upload/wachtbak_cu.txt' (Errcode: 2) We have checked, and the file is indeed uploaded to the /upload directory on the web server. However, after the connection is established with mysql database, mysql tries to find the file on the mysql server. Question is this. Is it possible to import a file into mysql, using Load Data Infile, when you have 1 web server that runs the php apllication that imports the data, and 1 mysql database server? If that's not possible, is there a way to achieve this? rgds Hans Kind -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: load data in file
In the last episode (Dec 20), ads mysql said: Hi, I was looking to solution of same problem as Hans Kind. You have suggested to map network drive. Is it O.K.if SAMBA is ruuning on main server. Or can you guide to Documentation for mapping on Linux. I know it is out of topic but it will help me great. Thanks For Unix-Unix access, NFS is much better than SMB. I'm sure there a multitude of NFS howtos for Linux. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]