Mysql default root users can only access locally, not remote connection managementmysqlDatabase,LinuxHow to open it?Remote connection to mysql? Set steps as follows: 1, GRANT command to create remote connection byy3 and password www.ul00.com mysql-u root-p Mysql>GRANT ALL PRIVILEGES ON *.* TO itlogger@localhost IDENTIFIED BY ‘www.ul00.com’ WITH GRANT OPTION;
mysql>* TO IT itsloger@”%” IDENFIED BY’www.ul00.com ‘WITH GRANT OPTION; Add byy3 user authorization to access via localhost, password “www.ul00.com”. The second sentence gives access from any other host (Fullcard %) 2 and settings.FirewallAllow port vi/ etc/ sysconfig/IPAdd-A RH-Firwall-1-INPUT – m state NEW -m tcp -p tcp -dport 3306 -j ACCEPT (notes that add-ARH-Firewall-1-INPUT -j REJECT – subject to icmp-host-prohibited, otherwise not effective) Reactivate firewall service iptables restart 3, with: Mysql cannot connect remotely 1) See whether Mysql ‘ s port is correct, check the port occupancy through Nett-ntlp, normally 3306.) Error report: ERROR 2003 (HY000): Can’t contract to MySQL server on ‘192.168.5112(1111). See meg/cf. 3) Error: ERRO 2003 (HY000): Can’t connect to MySQL server on ‘192.168.5112’ (113) to see if the iptables did not allow mesql connection, whether normal remote access can be tested through:service iptablis stop-off tests and, if possible, set iptable to allow 3306 port (4)) Remote access to solutions that are slow in mysql
[mysqld]Add a database profile for kali linux or mariadb, most importantly nano/etc/mysql/mariadb.conf/50-server.cf modify bind-advice= 127.0.0.1 to 0.0.0.0
Remote access to mysql databaseSet Method 1, modify localhost to change “user” entry from “localhost” to “%” mysql in the “user” database>use mysql;
mysql>update user set host = ‘%’ where user = ‘root’;
mysql>select host, user from user;
mysql>FLUSH PRIVILES;
2. Assigning authorization to connect with mesql servers from any host: GRANT Aller PRIVILES *.* TO ‘myuser’@`%’ IDENFIED BY ‘mypassword’ WITH GRANT OPTION; Meuser/mypassword is connected with Mysql server from the mainframe of 192.168.225.166 at ip: GRANT ALL PRIVILEGES ON *.* TO ‘MYUSER’@’192.168.225.166’ INENTIFIED BY ‘mypassword’ WITH GRANT OPTION;
General mandate
mysql -h localhost -u root
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ WITH GRANT OPTION; // Give access to data as root on any host>FLUSH PRIVILES;
If there is an error in using mysql> grant all privileges on zhangsanDb.* to zhangsan@’%’ identified by ‘zhangsan’; flush privileges;
Address Mysql’s inability to connect remotely
1, correct port of Mysql throughnetstat -ntlpSee port occupancy, typically 3306. In connecting MySQl with a tool it is necessary to use the port. For example, My Admin\My Query Brown\MySQl Front etc. 2 Checking user permissions for correctness of mysql library’s user table has two records: host to localhost and % (for safety, % can be replaced by IP that you need external connection). 3; see/etc/mysql/my. cnf, whether skp-networking has been noted as having been misdirected: ERROR 2003 (Y000): Can’t conct to MySQL server on ‘192.168.51112’ (111)
sudo gedit /etc/mysql/my.cnf
#skip-external-local#bind-advice=127.0.0.1 skip-name-resolve4, to see if the iptables are stopped, unconnected, cannot be connected by:service iptables stop temporarily. Error: Error 2003 (HY000): Can’t conect to MySQL service on ‘192.168.51112’ (113)
未经允许不得转载:萌萌Apprentissage » linux using mysql remote connection
MySQL User Management: Add User, Authorize, Delete User
Mysql5.7 is a hundred times better performance than that.
learn NMAP