No MyCAT Database selected
use MyCAT数据库名;就可以了
Mysql在Linux安装成功后,一定要开启端口:3306
/修改数据库的密码
SET PASSWORD = PASSWORD('123456')
将mysql服务添加到系统服务并设置开启启动:
chkconfig --add mysql 添加到系统服务
chkconfig mysql on 设置开机启动
chkconfig 查看系统服务
开启mysql服务器的远程访问:
登陆之后:
grant all privileges on *.* to 'root' @'%' identified by '123456';
flush privileges;
开启服务器端口:
①第一种方式
vim /etc/sysconfig/iptables;
选中22的那一行
i输入
复制,粘贴 22->3306,22->8080
按esc :wq(退出并保存)
② 第二种方式:
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables status
不用按esc :wq(退出并保存)
修改之后重启防火墙:
service iptables restart
数据库导入数据:
cat sql | mysql -uroot -p密码;