Changing the location of my.ini and the order option files are read
I added a line to the [mysqld) group As --defaults-file=C:\WINDOWS\my.ini and then I restarted the service.Everything was fine.Then I took out the my.ini file in the MySQL instalation directory the result was an error message AS Could Not start the MySQL Service on Local Computer Error 1067 The preocess terminated unexpectedly According to the manual MySQL server reads option files in the order Default options are read from the following files in the given order: C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf C:\Program Files\MySQL\MySQL Server 5.0\my.ini C:\Program Files\MySQL\MySQL Server 5.0\my.cnf To see the order I ran the command mysqld-nt --verbose --help If the optin files read order is as above why can,t get the service started Varuna
Re: Any easier way to compare mysql schema of 50 databases?!
Uma Bhat wrote: Hey guys! *MySQL version 5.0* Hence before doing this, *we want to ensure that there is ABSOLUTE *no* difference in schema between each of them. (all datatypes, and other such database objects, engines, MUST be IDENTICAL).* *QUESTION* - what's the *EASIET way to compare* the schema's of ALL these 50 databases ? *WORKAROUND* i could think of - taking *mysqldump* of database (with * --no-data* option) and compare with *'diff'* UNIX command. BUT, this is a VERY TEDIOUS to carry out this process for 50 databases!!! It is not ... a simple shell script will do it for you and can even mail you the results about mismatch. Btw Why don't you consider having a single database replicated across 50 diff machines/servers ? Or is it sharding/partitioning of data across different instances ? Regards, Ranjeet Walunj *Are there any tools available* to accomplish this task? Many Thanks! Uma
Re: mysqld, mysqld-nt, mysqld-debug
Steve (n) Martin! if you want apache and mysql (and possibly PHP for scripting) AND you want all 3 to run at once then d/l and implement with XAMP there are alot of XAMP specific bells and whistles that are installed that get in the way of tuning your MySQL and tuning your Apache installations so my advice is if you just want to use Mysql standalone dont use XAMP but start mysql with mysqld as suggested Well, that's your opinion. But I think for beginners is XAMPP the best basis. Everything else you can later still wish to change. Once is a fact, I wanted no discussion on the pros and reignite XAMPP. I just wanted to help. ;-) Viel Gluck! Martin Good Luck? What for? Greetings, Steven -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Changing the location of my.ini and the order option files are read
Varuna Seneviratna schrieb: I added a line to the [mysqld) group As --defaults-file=C:\WINDOWS\my.ini and then I restarted the service.Everything was fine.Then I took out the my.ini file in the MySQL instalation directory the result was an error message AS Could Not start the MySQL Service on Local Computer Error 1067 The preocess terminated unexpectedly According to the manual MySQL server reads option files in the order Default options are read from the following files in the given order: C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf C:\Program Files\MySQL\MySQL Server 5.0\my.ini C:\Program Files\MySQL\MySQL Server 5.0\my.cnf To see the order I ran the command mysqld-nt --verbose --help If the optin files read order is as above why can,t get the service started Varuna if you want to learn about mysql and related technologies, try the xampp installation, brought to you by http://www.apachefriends.org/en/index.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Changing the location of my.ini and the order option files are read
Varuna, obviously it doesn't make much sense, to specify the my.ini location in my.ini itself. The --defaults-file option is used as a direct start-up parameter for mysql-server both, run as service or console-process. It simply tells the server-process where to look for the oneandonly my.ini. Any fullpath given here, overrides the default search-path during server-startup. I assume your server-process has been already started with a --defaults-file -option pointing to a my.ini in the mysql-application-directory, therefor it failed after deleting the file at this location. You may change the direct service-startup options by invoking mysqld-nt with options --remove and --install: With the install option you can specify the complete command-line including additional options which will be used when the server starts as a service. e.g. net stop mysql mysqld-nt --remove mysqld-nt --install MYSQL --defaults-file=\c:\program files(x86)\mysql\my.ini\ net start mysql Regards, Armin. 2008/10/6 Varuna Seneviratna [EMAIL PROTECTED]: I added a line to the [mysqld) group As --defaults-file=C:\WINDOWS\my.ini and then I restarted the service.Everything was fine.Then I took out the my.ini file in the MySQL instalation directory the result was an error message AS Could Not start the MySQL Service on Local Computer Error 1067 The preocess terminated unexpectedly According to the manual MySQL server reads option files in the order Default options are read from the following files in the given order: C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf C:\Program Files\MySQL\MySQL Server 5.0\my.ini C:\Program Files\MySQL\MySQL Server 5.0\my.cnf To see the order I ran the command mysqld-nt --verbose --help If the optin files read order is as above why can,t get the service started Varuna -- Aegaeon technologies GmbH phone: +49.941.8107344 fax: +49.941.8107356 Legal disclaimer: http://aegaeon.de/disclaimer/email_all_int.txt -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any easier way to compare mysql schema of 50 databases?!
In order to make your workaround less tedious you can write a shell script that dumps the structures of all 50 databases basically: for db in $(mysql [opts] -e 'show databases'); do mysqldump [opts] $db Done Olaf On 10/5/08 10:15 PM, Uma Bhat [EMAIL PROTECTED] wrote: Hey guys! We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. *MySQL version 5.0* *SCENARIO* - There are 50 mysql databases (which we have been informed that is of same schema - we are not sure) We are planning to consolidate the data spread across these 50 databases into a SINGLE database . Hence before doing this, *we want to ensure that there is ABSOLUTE *no* difference in schema between each of them. (all datatypes, and other such database objects, engines, MUST be IDENTICAL).* *QUESTION* - what's the *EASIET way to compare* the schema's of ALL these 50 databases ? *WORKAROUND* i could think of - taking *mysqldump* of database (with * --no-data* option) and compare with *'diff'* UNIX command. BUT, this is a VERY TEDIOUS to carry out this process for 50 databases!!! *Are there any tools available* to accomplish this task? Many Thanks! Uma - Confidentiality Notice: The following mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. The recipient is responsible to maintain the confidentiality of this information and to use the information only for authorized purposes. If you are not the intended recipient (or authorized to receive information for the intended recipient), you are hereby notified that any review, use, disclosure, distribution, copying, printing, or action taken in reliance on the contents of this e-mail is strictly prohibited. If you have received this communication in error, please notify us immediately by reply e-mail and destroy all copies of the original message. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Changing the location of my.ini and the order option files are read
Armin I did what you said, now I understand what you say that there is no sence in what I wanted to do.But I gave these commands as follows But it did not work.What I want is to specify a configuration file which is placed in the WINDOWS directory.The commands I ran C:\NET STOP MySQL C:\mysqld-nt --remove C:\mysqld-nt --install MYSQL --defaults-file=\c:\WINDOWS\my.ini\ Service successfully installed. C:\net start mysql System error 2 has occurred. The system cannot find the file specified. Why is the file not able to be found, I have taken my.ini out of the MySQL installation directory and placed it in the WINDOWS directory. Are there other commands to start a service apart from NET commands,like using mysqladmin? Varuna On Mon, Oct 6, 2008 at 7:07 PM, Armin Schöffmann [EMAIL PROTECTED] wrote: Varuna, obviously it doesn't make much sense, to specify the my.ini location in my.ini itself. The --defaults-file option is used as a direct start-up parameter for mysql-server both, run as service or console-process. It simply tells the server-process where to look for the oneandonly my.ini. Any fullpath given here, overrides the default search-path during server-startup. I assume your server-process has been already started with a --defaults-file -option pointing to a my.ini in the mysql-application-directory, therefor it failed after deleting the file at this location. You may change the direct service-startup options by invoking mysqld-nt with options --remove and --install: With the install option you can specify the complete command-line including additional options which will be used when the server starts as a service. e.g. net stop mysql mysqld-nt --remove mysqld-nt --install MYSQL --defaults-file=\c:\program files(x86)\mysql\my.ini\ net start mysql Regards, Armin. 2008/10/6 Varuna Seneviratna [EMAIL PROTECTED]: I added a line to the [mysqld) group As --defaults-file=C:\WINDOWS\my.ini and then I restarted the service.Everything was fine.Then I took out the my.ini file in the MySQL instalation directory the result was an error message AS Could Not start the MySQL Service on Local Computer Error 1067 The preocess terminated unexpectedly According to the manual MySQL server reads option files in the order Default options are read from the following files in the given order: C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf C:\Program Files\MySQL\MySQL Server 5.0\my.ini C:\Program Files\MySQL\MySQL Server 5.0\my.cnf To see the order I ran the command mysqld-nt --verbose --help If the optin files read order is as above why can,t get the service started Varuna -- Aegaeon technologies GmbH phone: +49.941.8107344 fax: +49.941.8107356 Legal disclaimer: http://aegaeon.de/disclaimer/email_all_int.txt
Re: Any easier way to compare mysql schema of 50 databases?!
Uma Bhat wrote: We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. If you can afford to spend a few dollars to get the right tool, you want to get DB Comparer for MySQL from the folks at EMS: http://www.sqlmanager.net/en/products/mysql/dbcomparer This tool will compare the schemas of 2 MySQL Databases and allow you to selectively choose which changes to make in order to synch to the master or the target DB. I've been using the PostgreSQL version of this tool for many years and just recently started using their MySQL one. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL University session on October 9: Patch Management With Quilt
Hi, This Thursday, Stewart Smith will give a MySQL University session: http://forge.mysql.com/wiki/Patch_Management_With_Quilt (topic: Patch Management With Quilt) *** Note that this particular session starts 9:00 BST / 10:00 CET / 18:00 Brisbane/Melbourne *** Please register for this session by filling in your name on the session Wiki page. Registering is not required but appreciated. That Wiki page also contains a section to post questions. Please use it! MySQL University sessions normally start at 13:00 UTC (summer) or 14:00 UTC (winter); see: http://forge.mysql.com/wiki/MySQL_University for more time zone information. Those planning to attend a MySQL University session for the very first time should probably read the instructions for attendees, http://forge.mysql.com/wiki/Instructions_for_Attendees. See http://forge.mysql.com/wiki/MySQL_University#Upcoming_Sessions for the complete list of upcoming University sessions. -Stefan -- *** Sun Microsystems GmbHStefan Hinz Sonnenallee 1Manager Documentation, Database Group 85551 Kirchheim-Heimstetten Phone: +49-30-82702940 Germany Fax: +49-30-82702941 http://www.sun.de/mysql mailto: [EMAIL PROTECTED] Amtsgericht Muenchen: HRB161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering *** -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Getting more info from show full processlist
Hello, reading the MySQL documentation I've run into the show full processlist\G command. In my case I've got an output similar to this: - mysql show full processlist\G *** 1. row *** Id: 30127 User: root Host: localhost db: NULL Command: Query Time: 0 State: NULL Info: show full processlist *** 2. row *** Id: 30399 User: root Host: localhost db: this would be my DB Command: Sleep Time: 0 State: Info: NULL - What I'd like to know is how to get more info about the query identified with 30399 (in this example). I mean, the exact query, like SELECT pr1, pr2 FROM someDB. Thanks Matias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Getting more info from show full processlist
It specifies the query in the Info field. In your case the connection is sleeping, nothing is being executed at the moment, therefore info is NULL Olaf On 10/6/08 11:38 AM, MaBa.listas [EMAIL PROTECTED] wrote: Hello, reading the MySQL documentation I've run into the show full processlist\G command. In my case I've got an output similar to this: -- --- mysql show full processlist\G *** 1. row *** Id: 30127 User: root Host: localhost db: NULL Command: Query Time: 0 State: NULL Info: show full processlist *** 2. row *** Id: 30399 User: root Host: localhost db: this would be my DB Command: Sleep Time: 0 State: Info: NULL -- --- What I'd like to know is how to get more info about the query identified with 30399 (in this example). I mean, the exact query, like SELECT pr1, pr2 FROM someDB. Thanks Matias - Confidentiality Notice: The following mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. The recipient is responsible to maintain the confidentiality of this information and to use the information only for authorized purposes. If you are not the intended recipient (or authorized to receive information for the intended recipient), you are hereby notified that any review, use, disclosure, distribution, copying, printing, or action taken in reliance on the contents of this e-mail is strictly prohibited. If you have received this communication in error, please notify us immediately by reply e-mail and destroy all copies of the original message. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Access Rights ?
Hi all, I am newbie using MySQL. I want to log each client request to database server. I thought when server checks access rights of user(client) will be good place to log all access/read/update requests. If somebody knows where exactly this is done in source code, I will get a real kick start. Right now I am browsing through the source code through cscope to find out this. Any help in this regard is appreciated. Thanks, Sachin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Any easier way to compare mysql schema of 50 databases?!
Hi, I was also going to go down this route some time back, but then when I looked at it, it's pretty simple how it works and you can do the same thing yourself for free. Take a dump of both servers (mysqldump or via MySQL Administrator) of the databases in question, then use WinMerge (for free) to compare the dump files and (optionally) create a 3rd file which is a result of merging the 2 by choosing the changes you want to keep. I've used this method plenty of times to synchronise changes between servers, some that concern 000s of rows of data. Granted you cannot do this with PostgreSQL as those dumps tend to be in binary format, but it works well for MySQL backups. WinMerge: http://www.winmerge.org/ Andy D. Dante Lorenso wrote: Uma Bhat wrote: We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. If you can afford to spend a few dollars to get the right tool, you want to get DB Comparer for MySQL from the folks at EMS: http://www.sqlmanager.net/en/products/mysql/dbcomparer This tool will compare the schemas of 2 MySQL Databases and allow you to selectively choose which changes to make in order to synch to the master or the target DB. I've been using the PostgreSQL version of this tool for many years and just recently started using their MySQL one. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Rights ?
Hi Sachin, MySQL is capable of logging all queries to a log file, see http://dev.mysql.com/doc/refman/5.0/en/query-log.html. This includes connections, disconnections and executed SQL statements - no coding needed! If you want this information imported into a database table, a couple of hours and a few cups of coffee will allow you to write a simple PHP script (or C program for the hard-core developers) to read this file and write the details of each record to a database table. Regards, Andy Sachin Gaikwad wrote: Hi all, I am newbie using MySQL. I want to log each client request to database server. I thought when server checks access rights of user(client) will be good place to log all access/read/update requests. If somebody knows where exactly this is done in source code, I will get a real kick start. Right now I am browsing through the source code through cscope to find out this. Any help in this regard is appreciated. Thanks, Sachin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Access Rights ?
This problem is Chapter 16.6 of The MYSQL Cookbook, (second edition) that has made my(sql) life much easier. You might want to look around at http://artfulsoftware.com/ which has lots of examples and a great e-book resource. Both of these are fantastic resources for me, and they are probably my most used books in my mysql library. Good luck, Craig This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -Original Message- From: Sachin Gaikwad [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 2:07 PM To: mysql@lists.mysql.com Subject: Access Rights ? Hi all, I am newbie using MySQL. I want to log each client request to database server. I thought when server checks access rights of user(client) will be good place to log all access/read/update requests. If somebody knows where exactly this is done in source code, I will get a real kick start. Right now I am browsing through the source code through cscope to find out this. Any help in this regard is appreciated. Thanks, Sachin -- 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]
C api - mysql_list_fields
I'm probably being a bit stupid - but I'm trying to determine (in code) the length of the string in the schema for a given table. So - for example : create table a ( blah char(20) ) I want to return '20', but I'm getting '60' when I use mysql_list_fields.. (Always seems to be 3x longer that I'm expecting)... Am I missing something ? (or should I just divide by 3!!) Heres an example : #include stdio.h #include stdlib.h #include mysql.h MYSQL conn; int main(int argc,char *argv[]) { // run with username port as arguments char *tabname=a; char *db=test1; char *u; char *p; MYSQL_RES *result; MYSQL_FIELD *field; if (argc!=3) { printf(usage : %s username password\n, argv[0]);exit(2); } u=argv[1]; p=argv[2]; mysql_init(conn); if (!mysql_real_connect(conn, NULL,u,p,db,0,NULL,0) ) { fprintf(stderr, Failed to connect to database: Error: %s\n, mysql_error(conn)); exit(2); } result = mysql_list_fields (conn, tabname, NULL); field = mysql_fetch_field (result); printf(Field =%s Type=%d Length=%d\n, field-name, field-type, field-length); } Thanks in advance... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Rights ?
Thanks a bunch for the quick reply. I will surely write a C program to read this logfile of general queries. But before that I am not able to find this logfile for general queries. I started my server like this: $/etc/init.d/mysqld start --log=logfile --log-output=/tmp Meaning log file will be in = /tmp/logfile $mysql mysql select * from whowhatwhen; xx xxx x mysql So this query should exist in logfile. But I am not able to see this logfile in /tmp itself. What am I missing ? Thanks, Sachin On Mon, Oct 6, 2008 at 2:29 PM, Weston, Craig (OFT) [EMAIL PROTECTED] wrote: This problem is Chapter 16.6 of The MYSQL Cookbook, (second edition) that has made my(sql) life much easier. You might want to look around at http://artfulsoftware.com/ which has lots of examples and a great e-book resource. Both of these are fantastic resources for me, and they are probably my most used books in my mysql library. Good luck, Craig This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -Original Message- From: Sachin Gaikwad [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 2:07 PM To: mysql@lists.mysql.com Subject: Access Rights ? Hi all, I am newbie using MySQL. I want to log each client request to database server. I thought when server checks access rights of user(client) will be good place to log all access/read/update requests. If somebody knows where exactly this is done in source code, I will get a real kick start. Right now I am browsing through the source code through cscope to find out this. Any help in this regard is appreciated. Thanks, Sachin -- 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: Access Rights ?
More on this: I set following in /etc/my.cnf: log = FILE, TABLE after this I am not able to start my mysqld, it fails with timeout error message Timeout error occurred trying to start MySQL Daemon. Thanks, Sachin On Mon, Oct 6, 2008 at 3:01 PM, Sachin Gaikwad [EMAIL PROTECTED] wrote: Thanks a bunch for the quick reply. I will surely write a C program to read this logfile of general queries. But before that I am not able to find this logfile for general queries. I started my server like this: $/etc/init.d/mysqld start --log=logfile --log-output=/tmp Meaning log file will be in = /tmp/logfile $mysql mysql select * from whowhatwhen; xx xxx x mysql So this query should exist in logfile. But I am not able to see this logfile in /tmp itself. What am I missing ? Thanks, Sachin On Mon, Oct 6, 2008 at 2:29 PM, Weston, Craig (OFT) [EMAIL PROTECTED] wrote: This problem is Chapter 16.6 of The MYSQL Cookbook, (second edition) that has made my(sql) life much easier. You might want to look around at http://artfulsoftware.com/ which has lots of examples and a great e-book resource. Both of these are fantastic resources for me, and they are probably my most used books in my mysql library. Good luck, Craig This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -Original Message- From: Sachin Gaikwad [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 2:07 PM To: mysql@lists.mysql.com Subject: Access Rights ? Hi all, I am newbie using MySQL. I want to log each client request to database server. I thought when server checks access rights of user(client) will be good place to log all access/read/update requests. If somebody knows where exactly this is done in source code, I will get a real kick start. Right now I am browsing through the source code through cscope to find out this. Any help in this regard is appreciated. Thanks, Sachin -- 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: Access Rights ?
Alrite guys. I added log=/tmp/logfile in /etc/my.cnf and removed log = FILE, TABLE. Now it is logging each query. Thanks for the support. Sachin On Mon, Oct 6, 2008 at 3:13 PM, Sachin Gaikwad [EMAIL PROTECTED] wrote: More on this: I set following in /etc/my.cnf: log = FILE, TABLE after this I am not able to start my mysqld, it fails with timeout error message Timeout error occurred trying to start MySQL Daemon. Thanks, Sachin On Mon, Oct 6, 2008 at 3:01 PM, Sachin Gaikwad [EMAIL PROTECTED] wrote: Thanks a bunch for the quick reply. I will surely write a C program to read this logfile of general queries. But before that I am not able to find this logfile for general queries. I started my server like this: $/etc/init.d/mysqld start --log=logfile --log-output=/tmp Meaning log file will be in = /tmp/logfile $mysql mysql select * from whowhatwhen; xx xxx x mysql So this query should exist in logfile. But I am not able to see this logfile in /tmp itself. What am I missing ? Thanks, Sachin On Mon, Oct 6, 2008 at 2:29 PM, Weston, Craig (OFT) [EMAIL PROTECTED] wrote: This problem is Chapter 16.6 of The MYSQL Cookbook, (second edition) that has made my(sql) life much easier. You might want to look around at http://artfulsoftware.com/ which has lots of examples and a great e-book resource. Both of these are fantastic resources for me, and they are probably my most used books in my mysql library. Good luck, Craig This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -Original Message- From: Sachin Gaikwad [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 2:07 PM To: mysql@lists.mysql.com Subject: Access Rights ? Hi all, I am newbie using MySQL. I want to log each client request to database server. I thought when server checks access rights of user(client) will be good place to log all access/read/update requests. If somebody knows where exactly this is done in source code, I will get a real kick start. Right now I am browsing through the source code through cscope to find out this. Any help in this regard is appreciated. Thanks, Sachin -- 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: Access Rights ?
Hi Sachin, What version of MySQL are you running? I believe --log-output was only added in 5.1 which is why a 5.0 server would fail to start with this option set. I think the relevant option should also be log-output in my.cnf / my.ini (e.g. log-output = FILE, TABLE.) It looks like 5.1 greatly improves on the functionality you're looking for, including the native ability to write the logs to a database table, however it's currently more efficient to write to a file than it is to a table. See http://dev.mysql.com/doc/refman/5.1/en/log-tables.html for more information. Andy Sachin Gaikwad wrote: Alrite guys. I added log=/tmp/logfile in /etc/my.cnf and removed log = FILE, TABLE. Now it is logging each query. Thanks for the support. Sachin On Mon, Oct 6, 2008 at 3:13 PM, Sachin Gaikwad [EMAIL PROTECTED] wrote: More on this: I set following in /etc/my.cnf: log = FILE, TABLE after this I am not able to start my mysqld, it fails with timeout error message Timeout error occurred trying to start MySQL Daemon. Thanks, Sachin On Mon, Oct 6, 2008 at 3:01 PM, Sachin Gaikwad [EMAIL PROTECTED] wrote: Thanks a bunch for the quick reply. I will surely write a C program to read this logfile of general queries. But before that I am not able to find this logfile for general queries. I started my server like this: $/etc/init.d/mysqld start --log=logfile --log-output=/tmp Meaning log file will be in = /tmp/logfile $mysql mysql select * from whowhatwhen; xx xxx x mysql So this query should exist in logfile. But I am not able to see this logfile in /tmp itself. What am I missing ? Thanks, Sachin On Mon, Oct 6, 2008 at 2:29 PM, Weston, Craig (OFT) [EMAIL PROTECTED] wrote: This problem is Chapter 16.6 of The MYSQL Cookbook, (second edition) that has made my(sql) life much easier. You might want to look around at http://artfulsoftware.com/ which has lots of examples and a great e-book resource. Both of these are fantastic resources for me, and they are probably my most used books in my mysql library. Good luck, Craig This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -Original Message- From: Sachin Gaikwad [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 2:07 PM To: mysql@lists.mysql.com Subject: Access Rights ? Hi all, I am newbie using MySQL. I want to log each client request to database server. I thought when server checks access rights of user(client) will be good place to log all access/read/update requests. If somebody knows where exactly this is done in source code, I will get a real kick start. Right now I am browsing through the source code through cscope to find out this. Any help in this regard is appreciated. Thanks, Sachin -- 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: Any easier way to compare mysql schema of 50 databases?!
Thank you all, guys!! i shall try these and respond on which worked best for me. Regards, Uma On 10/6/08, Andy Shellam [EMAIL PROTECTED] wrote: Hi, I was also going to go down this route some time back, but then when I looked at it, it's pretty simple how it works and you can do the same thing yourself for free. Take a dump of both servers (mysqldump or via MySQL Administrator) of the databases in question, then use WinMerge (for free) to compare the dump files and (optionally) create a 3rd file which is a result of merging the 2 by choosing the changes you want to keep. I've used this method plenty of times to synchronise changes between servers, some that concern 000s of rows of data. Granted you cannot do this with PostgreSQL as those dumps tend to be in binary format, but it works well for MySQL backups. WinMerge: http://www.winmerge.org/ Andy D. Dante Lorenso wrote: Uma Bhat wrote: We are in progress of *optimizing* and designing the existing mysql database enviromnent on *linux*. And need help in comaparing schema of 50 databases from the same mysql instance. If you can afford to spend a few dollars to get the right tool, you want to get DB Comparer for MySQL from the folks at EMS: http://www.sqlmanager.net/en/products/mysql/dbcomparer This tool will compare the schemas of 2 MySQL Databases and allow you to selectively choose which changes to make in order to synch to the master or the target DB. I've been using the PostgreSQL version of this tool for many years and just recently started using their MySQL one. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]