How to create mysql login-path

This is just a note to myself. I don’t do this often enough to remember the command, but whenever I’m searching for this, it takes half a minute to find it in MySQL manual, so hopefully this gets indexed better (in my memory as well as in Google).

Here’s the simple command to create a login path:

mysql_config_editor set --login-path=mysql1  --host=localhost \
   --port=3306 --socket=/path/to/socket --user=root --password

Obviously you can remove just about anything and only leave the essentials.

Once that’s done, accessing different MySQL instances is as simple as mysql --login-path=mysql1, which is especially useful if you’re accessing different servers from one machine, or if you’re running several MySQL instances on the same machine.

More information on login paths here.

The post How to create mysql login-path appeared first on Speedemy.

关注dbDao.com的新浪微博

扫码加入微信Oracle小密圈,了解Oracle最新技术下载分享资源

TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569