Re: Problem with MySQL prompt
Hi Krishna, thanks for the your answer !!! I have three different my.cnf for my three instances but one general my.cnf to manage all instances, my general my.cnf is: [mysqld_multi] mysqld = /opt/local/mysql50/bin/mysqld_safe mysqladmin = /opt/local/mysql50/bin/mysqladmin user = root password = mysys2008srv log = /MYSQL/MYSQL_LOG/Mysqld_Multi_Log/mysqld_multi.log ## ISTANZE DELLA PARTE PRODUZIONE ##--- ## ISTANZA SIA DI PRODUZIONE ##-- [mysqld01] defaults-file = /etc/mysql.config/my50_SIA.cnf socket = /tmp/mysql50_SIA.sock port = 3307 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/SIA/mysql50_SIA.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/SIA ## ISTANZA IPPOFONO DI PRODUZIONE ##--- [mysqld02] defaults-file = /etc/mysql.config/my50_IPPOFONO.cnf socket = /tmp/mysql50_IPPOFONO.sock port = 3306 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO/mysql50_IPPOFONO.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO ### ## ISTANZE DELLA PARTE SVILUPPO ##- ## ISTANZA SIA DI SVILUPPO ## [mysqld11] defaults-file = /etc/mysql.config/my50_SIA_SVILUPPO.cnf socket = /tmp/mysql50_SIA_SVILUPPO.sock port = 3317 pid-file = /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO/ mysql50_SIA_SVILUPPO.pid datadir= /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO but if I put the variable prompt in the specific my.cnf (for example / etc/mysql.config/my50_SIA_SVILUPPO.cnf), the prompt doesn't change By Il giorno 22/dic/08, alle ore 11:59, Krishna Chandra Prajapati ha scritto: Hi Stefano, You are running three mysql instance on single server. You can have three my.cnf say my.cnf, my1.cnf, my2.cnf with different port and socket and other information in them. In this way you can set the prompt for different instance. On Mon, Dec 22, 2008 at 3:46 PM, Stefano Elmopi stefano.elm...@sociale.it wrote: I need advice. I have three instances of MySQL on a single server. How can I change the MySQL prompt depending of the instance on which connecting ? If I put the variable prompt in the general my.cnf, the prompt is changed but for all instances. If I put in the variable prompt in the my.cnf associated with the instance in the [mysql] section, the prompt does not change. Thanks Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=prajapat...@gmail.com -- Krishna Chandra Prajapati Mob: 9912924044 Email-id: prajapat...@gmail.com Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it
Re: Problem with MySQL prompt
Hi Stefano, I have tested. It's working fine without any issue. Open mysql configuration(.cnf) file referencing to 1st mysql instance. Add the below entires and restart the mysql server. [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates prompt = 'mysql5.1.30 ' [r...@linux18 ~]# mysql --defaults-file=/etc/my1.cnf Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.30 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql5.1.30 Thanks, -Krishna Chandra Prajapati On Tue, Dec 23, 2008 at 2:00 PM, Stefano Elmopi stefano.elm...@sociale.itwrote: Hi Krishna, thanks for the your answer !!! I have three different my.cnf for my three instances but one general my.cnf to manage all instances, my general my.cnf is: [mysqld_multi] mysqld = /opt/local/mysql50/bin/mysqld_safe mysqladmin = /opt/local/mysql50/bin/mysqladmin user = root password = mysys2008srv log = /MYSQL/MYSQL_LOG/Mysqld_Multi_Log/mysqld_multi.log ## ISTANZE DELLA PARTE PRODUZIONE ##--- ## ISTANZA SIA DI PRODUZIONE ##-- [mysqld01] defaults-file = /etc/mysql.config/my50_SIA.cnf socket = /tmp/mysql50_SIA.sock port = 3307 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/SIA/mysql50_SIA.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/SIA ## ISTANZA IPPOFONO DI PRODUZIONE ##--- [mysqld02] defaults-file = /etc/mysql.config/my50_IPPOFONO.cnf socket = /tmp/mysql50_IPPOFONO.sock port = 3306 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO/mysql50_IPPOFONO.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO ### ## ISTANZE DELLA PARTE SVILUPPO ##- ## ISTANZA SIA DI SVILUPPO ## [mysqld11] defaults-file = /etc/mysql.config/my50_SIA_SVILUPPO.cnf socket = /tmp/mysql50_SIA_SVILUPPO.sock port = 3317 pid-file = /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO/mysql50_SIA_SVILUPPO.pid datadir= /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO but if I put the variable prompt in the specific my.cnf (for example /etc/mysql.config/my50_SIA_SVILUPPO.cnf),the prompt doesn't change By Il giorno 22/dic/08, alle ore 11:59, Krishna Chandra Prajapati ha scritto: Hi Stefano, You are running three mysql instance on single server. You can have three my.cnf say my.cnf, my1.cnf, my2.cnf with different port and socket and other information in them. In this way you can set the prompt for different instance. On Mon, Dec 22, 2008 at 3:46 PM, Stefano Elmopi stefano.elm...@sociale.it wrote: I need advice. I have three instances of MySQL on a single server. How can I change the MySQL prompt depending of the instance on which connecting ? If I put the variable prompt in the general my.cnf, the prompt is changed but for all instances. If I put in the variable prompt in the my.cnf associated with the instance in the [mysql] section, the prompt does not change. Thanks Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it email%3astefano.elm...@sociale.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=prajapat...@gmail.com -- Krishna Chandra Prajapati Mob: 9912924044 Email-id: prajapat...@gmail.com Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it -- Krishna Chandra Prajapati MySQL DBA, Ed Ventures e-Learning Pvt.Ltd. 1-8-303/48/15, Sindhi Colony P.G.Road, Secunderabad. Pin Code: 53 Office Number: 040-66489771 Mob: 9912924044 URL: ed-ventures-online.com Email-id: prajapat...@gmail.com
Re: Problem with MySQL prompt
Hi Krishna, the problem is that you use --default-file on the command line and in this mode it's working fine, I also tried, but I have the configuration of the variable default-file in the general my.cnf and I enter in MySQL in this way: mysql --socket=/tmp/mysql50_SIA_SVILUPPO.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1408 Server version: 5.0.51b-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql in my case the prompt doesn't change Il giorno 23/dic/08, alle ore 11:01, Krishna Chandra Prajapati ha scritto: Hi Stefano, I have tested. It's working fine without any issue. Open mysql configuration(.cnf) file referencing to 1st mysql instance. Add the below entires and restart the mysql server. [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates prompt = 'mysql5.1.30 ' [r...@linux18 ~]# mysql --defaults-file=/etc/my1.cnf Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.30 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql5.1.30 Thanks, -Krishna Chandra Prajapati On Tue, Dec 23, 2008 at 2:00 PM, Stefano Elmopi stefano.elm...@sociale.it wrote: Hi Krishna, thanks for the your answer !!! I have three different my.cnf for my three instances but one general my.cnf to manage all instances, my general my.cnf is: [mysqld_multi] mysqld = /opt/local/mysql50/bin/mysqld_safe mysqladmin = /opt/local/mysql50/bin/mysqladmin user = root password = mysys2008srv log = /MYSQL/MYSQL_LOG/Mysqld_Multi_Log/mysqld_multi.log ## ISTANZE DELLA PARTE PRODUZIONE ##--- ## ISTANZA SIA DI PRODUZIONE ##-- [mysqld01] defaults-file = /etc/mysql.config/my50_SIA.cnf socket = /tmp/mysql50_SIA.sock port = 3307 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/SIA/mysql50_SIA.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/SIA ## ISTANZA IPPOFONO DI PRODUZIONE ##--- [mysqld02] defaults-file = /etc/mysql.config/my50_IPPOFONO.cnf socket = /tmp/mysql50_IPPOFONO.sock port = 3306 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO/ mysql50_IPPOFONO.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO ### ## ISTANZE DELLA PARTE SVILUPPO ##- ## ISTANZA SIA DI SVILUPPO ## [mysqld11] defaults-file = /etc/mysql.config/my50_SIA_SVILUPPO.cnf socket = /tmp/mysql50_SIA_SVILUPPO.sock port = 3317 pid-file = /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO/ mysql50_SIA_SVILUPPO.pid datadir= /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO but if I put the variable prompt in the specific my.cnf (for example /etc/mysql.config/my50_SIA_SVILUPPO.cnf), the prompt doesn't change By Il giorno 22/dic/08, alle ore 11:59, Krishna Chandra Prajapati ha scritto: Hi Stefano, You are running three mysql instance on single server. You can have three my.cnf say my.cnf, my1.cnf, my2.cnf with different port and socket and other information in them. In this way you can set the prompt for different instance. On Mon, Dec 22, 2008 at 3:46 PM, Stefano Elmopi stefano.elm...@sociale.it wrote: I need advice. I have three instances of MySQL on a single server. How can I change the MySQL prompt depending of the instance on which connecting ? If I put the variable prompt in the general my.cnf, the prompt is changed but for all instances. If I put in the variable prompt in the my.cnf associated with the instance in the [mysql] section, the prompt does not change. Thanks Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=prajapat...@gmail.com -- Krishna Chandra Prajapati Mob: 9912924044 Email-id: prajapat...@gmail.com Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it -- Krishna Chandra Prajapati MySQL DBA, Ed Ventures e-Learning Pvt.Ltd. 1-8-303/48/15, Sindhi Colony P.G.Road, Secunderabad. Pin Code: 53 Office Number: 040-66489771 Mob: 9912924044 URL: ed-ventures-online.com Email-id: prajapat...@gmail.com Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it
Re: Problem with MySQL prompt
Hi Stefano, I believe that, different mysql configuration file for different mysql instance is a better idea. In your case, if any thing goes wrong with my.cnf Then, it is going to effect all mysql instance (either restart mysql server or any other way). It has a lots of disadvantages. You might be using mysql_multi to manage mysql instance (restart, start, stop) As, you told me. You have 1 general my.cnf and three different my.cnf for mysql instance. In one of my.cnf add and try [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates prompt = 'mysql5.1.30 ' But again, if you are connecting with socket then it will not show the changed prompt. Try, to connect using defaults-file. I feel that connecting to mysql server using socket is not reading the configuration file. i mean to say the it's using default available to it. Thanks, Krishna Chandra Prajapati On Tue, Dec 23, 2008 at 5:14 PM, Stefano Elmopi stefano.elm...@sociale.itwrote: Hi Krishna, the problem is that you use --default-file on the command line and in this mode it's working fine, I also tried, but I have the configuration of the variable default-file in the general my.cnf and I enter in MySQL in this way: mysql --socket=/tmp/mysql50_SIA_SVILUPPO.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1408 Server version: 5.0.51b-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql in my case the prompt doesn't change Il giorno 23/dic/08, alle ore 11:01, Krishna Chandra Prajapati ha scritto: Hi Stefano, I have tested. It's working fine without any issue. Open mysql configuration(.cnf) file referencing to 1st mysql instance. Add the below entires and restart the mysql server. [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates prompt = 'mysql5.1.30 ' [r...@linux18 ~]# mysql --defaults-file=/etc/my1.cnf Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.30 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql5.1.30 Thanks, -Krishna Chandra Prajapati On Tue, Dec 23, 2008 at 2:00 PM, Stefano Elmopi stefano.elm...@sociale.it wrote: Hi Krishna, thanks for the your answer !!! I have three different my.cnf for my three instances but one general my.cnf to manage all instances, my general my.cnf is: [mysqld_multi] mysqld = /opt/local/mysql50/bin/mysqld_safe mysqladmin = /opt/local/mysql50/bin/mysqladmin user = root password = mysys2008srv log = /MYSQL/MYSQL_LOG/Mysqld_Multi_Log/mysqld_multi.log ## ISTANZE DELLA PARTE PRODUZIONE ##--- ## ISTANZA SIA DI PRODUZIONE ##-- [mysqld01] defaults-file = /etc/mysql.config/my50_SIA.cnf socket = /tmp/mysql50_SIA.sock port = 3307 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/SIA/mysql50_SIA.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/SIA ## ISTANZA IPPOFONO DI PRODUZIONE ##--- [mysqld02] defaults-file = /etc/mysql.config/my50_IPPOFONO.cnf socket = /tmp/mysql50_IPPOFONO.sock port = 3306 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO/mysql50_IPPOFONO.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO ### ## ISTANZE DELLA PARTE SVILUPPO ##- ## ISTANZA SIA DI SVILUPPO ## [mysqld11] defaults-file = /etc/mysql.config/my50_SIA_SVILUPPO.cnf socket = /tmp/mysql50_SIA_SVILUPPO.sock port = 3317 pid-file = /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO/mysql50_SIA_SVILUPPO.pid datadir= /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO but if I put the variable prompt in the specific my.cnf (for example /etc/mysql.config/my50_SIA_SVILUPPO.cnf),the prompt doesn't change By Il giorno 22/dic/08, alle ore 11:59, Krishna Chandra Prajapati ha scritto: Hi Stefano, You are running three mysql instance on single server. You can have three my.cnf say my.cnf, my1.cnf, my2.cnf with different port and socket and other information in them. In this way you can set the prompt for different instance. On Mon, Dec 22, 2008 at 3:46 PM, Stefano Elmopi stefano.elm...@sociale.it wrote: I need advice. I have three instances of MySQL on a single server. How can I change the MySQL prompt depending of the instance on which connecting ? If I put the variable prompt in the general my.cnf, the prompt is changed but for all instances. If I put in the variable prompt in the my.cnf associated with the instance in the [mysql] section, the prompt does not change. Thanks Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel.
Re: Problem with MySQL prompt
Hi Krishna, I use the script mysql_multi to stop and the start several, or all, instances. At the end, to work with more ease, I will create scripts to connect to each instance and in the script force the variable prompt at the connection seems easy Thanks for all !!! Il giorno 23/dic/08, alle ore 13:51, Krishna Chandra Prajapati ha scritto: Hi Stefano, I believe that, different mysql configuration file for different mysql instance is a better idea. In your case, if any thing goes wrong with my.cnf Then, it is going to effect all mysql instance (either restart mysql server or any other way). It has a lots of disadvantages. You might be using mysql_multi to manage mysql instance (restart, start, stop) As, you told me. You have 1 general my.cnf and three different my.cnf for mysql instance. In one of my.cnf add and try [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates prompt = 'mysql5.1.30 ' But again, if you are connecting with socket then it will not show the changed prompt. Try, to connect using defaults-file. I feel that connecting to mysql server using socket is not reading the configuration file. i mean to say the it's using default available to it. Thanks, Krishna Chandra Prajapati On Tue, Dec 23, 2008 at 5:14 PM, Stefano Elmopi stefano.elm...@sociale.it wrote: Hi Krishna, the problem is that you use --default-file on the command line and in this mode it's working fine, I also tried, but I have the configuration of the variable default-file in the general my.cnf and I enter in MySQL in this way: mysql --socket=/tmp/mysql50_SIA_SVILUPPO.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1408 Server version: 5.0.51b-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql in my case the prompt doesn't change Il giorno 23/dic/08, alle ore 11:01, Krishna Chandra Prajapati ha scritto: Hi Stefano, I have tested. It's working fine without any issue. Open mysql configuration(.cnf) file referencing to 1st mysql instance. Add the below entires and restart the mysql server. [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates prompt = 'mysql5.1.30 ' [r...@linux18 ~]# mysql --defaults-file=/etc/my1.cnf Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.30 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql5.1.30 Thanks, -Krishna Chandra Prajapati On Tue, Dec 23, 2008 at 2:00 PM, Stefano Elmopi stefano.elm...@sociale.it wrote: Hi Krishna, thanks for the your answer !!! I have three different my.cnf for my three instances but one general my.cnf to manage all instances, my general my.cnf is: [mysqld_multi] mysqld = /opt/local/mysql50/bin/mysqld_safe mysqladmin = /opt/local/mysql50/bin/mysqladmin user = root password = mysys2008srv log = /MYSQL/MYSQL_LOG/Mysqld_Multi_Log/mysqld_multi.log ## ISTANZE DELLA PARTE PRODUZIONE ##--- ## ISTANZA SIA DI PRODUZIONE ##-- [mysqld01] defaults-file = /etc/mysql.config/my50_SIA.cnf socket = /tmp/mysql50_SIA.sock port = 3307 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/SIA/mysql50_SIA.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/SIA ## ISTANZA IPPOFONO DI PRODUZIONE ##--- [mysqld02] defaults-file = /etc/mysql.config/my50_IPPOFONO.cnf socket = /tmp/mysql50_IPPOFONO.sock port = 3306 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO/ mysql50_IPPOFONO.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO ### ## ISTANZE DELLA PARTE SVILUPPO ##- ## ISTANZA SIA DI SVILUPPO ## [mysqld11] defaults-file = /etc/mysql.config/my50_SIA_SVILUPPO.cnf socket = /tmp/mysql50_SIA_SVILUPPO.sock port = 3317 pid-file = /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO/ mysql50_SIA_SVILUPPO.pid datadir= /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO but if I put the variable prompt in the specific my.cnf (for example /etc/mysql.config/my50_SIA_SVILUPPO.cnf), the prompt doesn't change By Il giorno 22/dic/08, alle ore 11:59, Krishna Chandra Prajapati ha scritto: Hi Stefano, You are running three mysql instance on single server. You can have three my.cnf say my.cnf, my1.cnf, my2.cnf with different port and socket and other information in them. In this way you can set the prompt for different instance. On Mon, Dec 22, 2008 at 3:46 PM, Stefano Elmopi stefano.elm...@sociale.it wrote: I need advice. I have three instances of MySQL on a single server. How can I change the MySQL prompt depending of the instance on which connecting ? If I put
Problem with MySQL prompt
I need advice. I have three instances of MySQL on a single server. How can I change the MySQL prompt depending of the instance on which connecting ? If I put the variable prompt in the general my.cnf, the prompt is changed but for all instances. If I put in the variable prompt in the my.cnf associated with the instance in the [mysql] section, the prompt does not change. Thanks Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Problem with MySQL prompt
Ciao Stefano, how do you connect to the different instances? if you use different operating system users or different mysql home directories just put in the home directory of each user a .my.cnf file (or my.cnf in the mysql home) with just the prompt setting in the [mysql] section. NOTE: in the home directory of the user the file starts with the dot(.my.cnf). The search order of mysql cnf files is, if my memory does not betray me, /etc/my.cnf $MYSQL_HOME/my.cnf $MYSQL_USER/.my.cnf they are all taken into consideration (like cascading style sheets) with the last setting overwriting the prevoius read ones. The only thing the prevent from reading all of the configuration files is specifying the option --defaults-file=/pat/to/my.cnf in the command line. Sorry I cannot test it now, so please try it. Aloha Claudio 2008/12/22 Stefano Elmopi stefano.elm...@sociale.it I need advice. I have three instances of MySQL on a single server. How can I change the MySQL prompt depending of the instance on which connecting ? If I put the variable prompt in the general my.cnf, the prompt is changed but for all instances. If I put in the variable prompt in the my.cnf associated with the instance in the [mysql] section, the prompt does not change. Thanks Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it email%3astefano.elm...@sociale.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com
Re: Problem with MySQL prompt
Stefano Elmopi wrote: If I put the variable prompt in the general my.cnf, the prompt is changed but for all instances. If I put in the variable prompt in the my.cnf associated with the instance in the [mysql] section, the prompt does not change. This is because the client reads from my.cnf before it starts talking to the server, and it can read any my.cnf file it likes. There's no way you can mandate that a single my.cnf file gets used for both the server and any client session connecting to it. Instead of running mysql(1) directly, I'd run it via one of three scripts, each of which sets up its environment so as to force mysql(1) to read a different my.cnf file in each case. This will also let you hard-code other information about each particular server that isn't important to keep secret, like the login name and the DB name. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Problem with MySQL prompt
Hi Stefano, You are running three mysql instance on single server. You can have three my.cnf say my.cnf, my1.cnf, my2.cnf with different port and socket and other information in them. In this way you can set the prompt for different instance. On Mon, Dec 22, 2008 at 3:46 PM, Stefano Elmopi stefano.elm...@sociale.itwrote: I need advice. I have three instances of MySQL on a single server. How can I change the MySQL prompt depending of the instance on which connecting ? If I put the variable prompt in the general my.cnf, the prompt is changed but for all instances. If I put in the variable prompt in the my.cnf associated with the instance in the [mysql] section, the prompt does not change. Thanks Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it email%3astefano.elm...@sociale.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=prajapat...@gmail.com -- Krishna Chandra Prajapati Mob: 9912924044 Email-id: prajapat...@gmail.com
Re: Problem with MySQL prompt
Thanks for the all answers !!! It's ok, even if I have three different my.cnf for my three instances, my general my.cnf is: [mysqld_multi] mysqld = /opt/local/mysql50/bin/mysqld_safe mysqladmin = /opt/local/mysql50/bin/mysqladmin user = root password = mysys2008srv log = /MYSQL/MYSQL_LOG/Mysqld_Multi_Log/mysqld_multi.log ## ISTANZE DELLA PARTE PRODUZIONE ##--- ## ISTANZA SIA DI PRODUZIONE ##-- [mysqld01] defaults-file = /etc/mysql.config/my50_SIA.cnf socket = /tmp/mysql50_SIA.sock port = 3307 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/SIA/mysql50_SIA.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/SIA ## ISTANZA IPPOFONO DI PRODUZIONE ##--- [mysqld02] defaults-file = /etc/mysql.config/my50_IPPOFONO.cnf socket = /tmp/mysql50_IPPOFONO.sock port = 3306 pid-file = /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO/mysql50_IPPOFONO.pid datadir= /DB_MYSQL_PRODUZIONE/MYSQL50/IPPOFONO ### ## ISTANZE DELLA PARTE SVILUPPO ##- ## ISTANZA SIA DI SVILUPPO ## [mysqld11] defaults-file = /etc/mysql.config/my50_SIA_SVILUPPO.cnf socket = /tmp/mysql50_SIA_SVILUPPO.sock port = 3317 pid-file = /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO/ mysql50_SIA_SVILUPPO.pid datadir= /DB_MYSQL_SVILUPPO/MYSQL50/SIA_SVILUPPO to have three different prompts, I have to create three scripts connection where I configure the prompt variable. I say right? By Il giorno 22/dic/08, alle ore 12:07, Warren Young ha scritto: Stefano Elmopi wrote: If I put the variable prompt in the general my.cnf, the prompt is changed but for all instances. If I put in the variable prompt in the my.cnf associated with the instance in the [mysql] section, the prompt does not change. This is because the client reads from my.cnf before it starts talking to the server, and it can read any my.cnf file it likes. There's no way you can mandate that a single my.cnf file gets used for both the server and any client session connecting to it. Instead of running mysql(1) directly, I'd run it via one of three scripts, each of which sets up its environment so as to force mysql(1) to read a different my.cnf file in each case. This will also let you hard-code other information about each particular server that isn't important to keep secret, like the login name and the DB name. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=stefano.elm...@sociale.it Ing. Stefano Elmopi Gruppo Darco - Area ICT Sistemi Via Ostiense 131/L Corpo B, 00154 Roma cell. 3466147165 tel. 0657060500 email:stefano.elm...@sociale.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Problem with MySQL prompt
prajapat...@gmail.com (Krishna Chandra Prajapati) writes: You are running three mysql instance on single server. You can have three my.cnf say my.cnf, my1.cnf, my2.cnf with different port and socket and other information in them. In this way you can set the prompt for different instance. It's a shame that the prompt can't be defined dynamically based on characteristics of the current connection. That would make it much easier to distinguish which db instance you are talking to and only have a single configuration. Is there not an entry in bugs.mysql.com for this? I had a quick look but couldn't find one. Simon -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org