Heim > Fragen und Antworten > Hauptteil
比如我在公司电脑上用Apache建的数据库,能不能在宿舍的电脑上连接?公司这台电脑的mysql是不是必须要开启才能连接?
ringa_lee2017-04-17 16:38:43
mysql 需要设置允许远程连接才可以
mysql>GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;
但是在这里你最好不要使用root ,可以新建一个一般的用户来访问