MySQL 0-1 linux os on load MySQL, boot automatically start MySQL, remote connection mysql

Source: Internet
Author: User
Tags mysql client

#yum   Source for MySQL installation package yum list mysql* #是否安装过yum  LIST INSTALLED MYSQL*RPM -QA  |grep mysql#1. Installing the mysql  client yum install mysql#2. Install mysql  server Side yum install  mysql-serveryum install mysql-devel  #3. Start, stop MySQL service and boot Service mysqld startservice  mysqld stopservice mysqld restart  #开机自启  chkconfig --add mysqld  Chkconfig mysqld on#4. Set character set  vi /etc/my.cnf  new  character-set-server=utf8  #5. Create root admin and login   mysqladmin -u root password  password  mysql -u root - P password   If you do not want to enter in plain text. Forgot root password  service mysqld stop mysqld_safe --user=root -- skip-grant-tables;  the [mysqld] field of the #或者在my. INI is added to the:skip-grant-tables  #这一步骤执行的时候不会出现新的命令行, you need to reopen a window to execute the following command   mysql -u root use mysql update user set password=password ( ' New password ')  where&nbspuser= ' root '; flush privileges; service mysqld restart;  can log in to # # with the new password. telnet to MySQL    #前提本地安装mysql客户端及服务器之间ping的通       #服务端          #关闭防火墙     service iptables stop     #查看服务及监听的端口是否正常       netstat -tulnp                 #vi  /etc/my.cnf   #确保skip-networking is removed or blocked, otherwise TCP/IP is not supported   Visit;                       #bind-address  Delete the row or change the IP to client ip     #重启mysqld服务       #mysql  -u root -p     #use  mysql      #grant  all privileges on *.* to  identified by  ' 123456 ';       #grant &NBsp;all privileges on *.* to  identified by  ' 654321 ';       # (above 130 two database user root and zsh)       #flush  privileges ;      #重启mysqld服务     #客户端     ping 192.168.150.131     mysql -uroot -h192.168.150.131 -p    mysql -uroot  -h192.168.150.131 -p                      #8. Uninstall     #查看安装过的mysql包     yum  list installed mysql*    yum -y remove mysql*     rm -rf /var/lib/mysql    rm /etc/my.cnf           #9 Important directory under Linux mysql     /etc/my.cnf  #数据库配置文件           where the path after DataDir is specified is the number of file storage addresses         mysql.sock is with each time  mysql server startup build, for MySQL client program                    mysql is on the same machine as the MySQL server-side program MySQLServer and is available when initiating a local connection        startup script/etc/init.d/mysql    log file mysql> show variables like  ' Log_ %‘;

MySQL 0-1 linux os on load MySQL, boot automatically start MySQL, remote connection mysql

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.