设置mysql为远程访问
系统运行在linux系统上,远程控制数据库是很有必要的,进入mysql
[root@localhost /]# mysql -uroot -p
password:******
mysql> select user,host from user where user='root'
+------+-----------------------+| user | host |+------+-----------------------+| root | 127.0.0.1 || root | localhost.localdomain |+------+-----------------------+
+------+-----------------------+| user | host |+------+-----------------------+| root | % || root | 127.0.0.1 || root | localhost.localdomain |+------+-----------------------+接下来实现远程连接mysql了,
C:\Documents and Settings\Administrator>mysql -h192.168.1.145 -uroot -pEnter password: ******Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 113 to server version: 5.1.49-logType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>