-
Notifications
You must be signed in to change notification settings - Fork 1.2k
The FAQs Of Running Atlas
Q1:I installed and launched Atlas successfully. But I can't login in Atlas using the username and password.For example, execute the command: MySQL - h127.0.0.1 - ubuck - phello - P1234; suggesting the following error: ERROR 2003 (HY000): Can't connect to MySQL server on'127.0.0.1'(111).How should I do ?
A:Maybe the problem is that the user privilege not be appropriate authorized. The username and its password in the master database server and the slave database server should be the same. Firstly you should assure that you can use the username and its password login the database in the computer that installe Atlas successfully. For example: using the command 'mysql -h192.168.0.12 -ubuck -pbuck -P3306'can login the master and the slave successfully.
Follow the three steps below, which can successfully login Atlas successfully.
step 1, create user buck in the master database server.
a) grant all on . to 'buck'@'192.168.0.14' identified by 'hello' ;
b) flush privileges;
step 2, create user buck in the slave database server.
a) grant all on . to 'buck'@'192.168.0.14' identified by 'hello' ;
b) flush privileges;
step 3, login Atlas.
mysql –h 127.0.0.1 –ubuck –phello –P1234
Q2:I installed and launched Atlas successfully. But I can't login in Atlas using the username and password.For example, execute the command: MySQL - h127.0.0.1 - ubuck - phello - P1234; suggesting the following error:MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'.How should I do ?
A: login the master and the slave, execute the commands below:
set global max_connect_errors=100000;
flush hosts;
Q3:I installed and launched Atlas successfully. But I can't login in Atlas using the username and password.For example, execute the command: MySQL - h127.0.0.1 - ubuck - phello - P1234; suggesting the following error:ERROR 1045 (28000): Access denied for user 'buck'@'127.0.0.1:44369' (using password: YES)'.How should I do ?
A: You should check the config file(test.cnf) whether contain the config option:pwds. If the config don't contain this config option,you should set it.
[mysql-proxy]
- 管理接口的用户名
- 管理接口的密码
- Atlas后端连接的MySQL主库的IP和端口,可设置多项,用逗号分隔
- 从库
- 用户名和密码配置项,需要和主从复制配置的用户名和密码配置一样
- 后台运行
- 工作线程数,对Atlas的性能有很大影响,可根据情况适当设置
- 日志级别,分为message、warning、critical、error、debug五个级别
- 日志存放的路径
- SQL日志的开关,可设置为OFF、ON、REALTIME,OFF代表不记录SQL日志,ON代表记录SQL日志,REALTIME代表记录SQL日>志且实时写入磁盘,默认为OFF
- sql-log = OFF
- 慢日志输出设置。当设置了该参数时,则日志只输出执行时间超过sql-log-slow(单位:ms)的日志>记录。不设置该参数则输出全部日志。
- 实例名称,用于同一台机器上多个Atlas实例间的区分
- Atlas监听的工作接口IP和端口
- Atlas监听的管理接口IP和端口
- 分表设置,此例中person为库名,mt为表名,id为分表字段,3为子表数量,可设置多项,以逗号分>隔,若不分表则不需要设置该项
- tables = person.mt.id.3
- 默认字符集,设置该项后客户端不再需要执行SET NAMES语句
- 允许连接Atlas的客户端的IP,可以是精确IP,也可以是IP段,以逗号分隔,若不设置该项则允许所>有IP连接,否则只允许列表中的IP连接
- client-ips = 127.0.0.1, 192.168.1
- Atlas前面挂接的LVS的物理网卡的IP(注意不是虚IP),若有LVS且设置了client-ips则此项必须设置>,否则可以不设置
- lvs-ips = 192.168.1.1