Redhat6 installing MySQL

Source: Internet
Author: User



Yum install MySQL
Yum Install Mysql-server
Yum Install Mysql-devel
Chgrp-r Mysql/var/lib/mysql
Chmod-r 770/var/lib/mysql

Service mysqld Start
Mysql
SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Secret_password ');



1. Create a new user.

//log in to MySQL
@>mysql-u root-p
@> Password
//Create user
mysql> INSERT INTO Mysql.user (Host,user,password) VALUES ("%", "Doctrack", Password ("Idoladmin"));
//Refresh System Permissions Table


GRANT All privileges on * * to 'doctrack' @ ' percent ' identified by 'idoladmin' with GRANT OPTION;
if you want to allow users to connect to the MySQL server from a host myuser IP 192.168.1.3 and use MyPassword as the password
GRANT All privileges on * * to 'doctrack' @ ' 192.168.1.3 ' identified by'idoladmin' with GRANT OPTION;


Mysql>flush privileges;




ODBC installation



Yum Install ftp://fr2.rpmfind.net/linux/centos/6.6/os/x86_64/Packages/mysql-connector-odbc-5.1.5r1144-7.el6.x86_64.rpm



MySQL Error: Access denied for user ' root ' @ ' localhost ' using password Yes


#/etc/init.d/mysqld Stop

# Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &

# mysql-u Root MySQL

mysql> UPDATE user SET Password=password (' NewPassword ') where user= ' root ';

mysql> FLUSH privileges;

Mysql> quit

#/etc/init.d/mysqld Restart

# mysql-uroot-p

Enter Password: < Enter the newly set password newpassword>

Mysql>




Redhat6 installing 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.