Home  >  Article  >  Database  >  MySQL一台主机多实例root登录问题_MySQL

MySQL一台主机多实例root登录问题_MySQL

WBOY
WBOYOriginal
2016-06-01 13:00:04910browse

如果在一台机子上起多个MySQL实例, 比如端口号为 3306, 3307, 3308

登录时候要选择不同的 mysql.sock文件

mysql -uroot -p123456 这一句 登录的是 3306的实例
mysql -uroot -p123456 -S /home/mysql_3307/mysql.sock 这一句 登录的是 3307的实例

这时候 用 -P 3307 这个选项是不管用的。 这个-P 的选项和 -h 应该是一起用的。

本机登录以来的是这个sock文件。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn