MySQL Base Configration Instructions
来源:互联网 发布:lol韩服mac版 下载 编辑:程序博客网 时间:2024/06/04 18:43
一、Install MySQL Community Service
MySQL Community Edition is the freely downloadable version of the world’s most popular open source database.It is available under the GPL license.
You can use the “apt-get install” command of Ubuntu to install MySQL Database.
$ sudo apt-get install mysql-server
Notes: When you install MySQL, you need to specify root account and password for MySQL.
$ sudo apt-get install mysql-client
After the MySQL installation is successful, MySQL server should start automatically. You can execute the following command to check MySQL server’s status:
$ sudo netstat -tap | grep mysql
The command is use to check listening port of MySQL, if these is listening port is exist that it is running.
二、MySQL Configration Instructions
1. Check to ensure that mysql server is running. It is not running, execute the following command to start it:
$ sudo /etc/init.d/mysql start
$ sudo /etc/init.d/mysql stop
$ sudo /etc/init.d/mysql restart
2. Login to mysql with root account.
$ mysql -u root –p // concrete format : mysql -u <UserName> -p [UserPassword]
3. Create MySQL account:
Method one:
Mysql> insert into mysql.user(Host,User,Password) values("localhost","<UserName>",password("<UserPassword>"));Method two:Mysql> flush privileges;
Mysql> CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass';
If you specify only the user name part of the account name, a host name part of '%' is used.
The user specification may indicate how the user should authenticate when connecting to the server:
To enable the user to connect with no password (which is insecure), include no IDENTIFIED BY clause:
Mysql>CREATE USER 'jeffrey'@'localhost';
In this case, the account uses the default authentication plugin and clients must provide no password.
To assign a password, use IDENTIFIED BY with the literal plaintext password value:
Mysql>CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass';
4. Create a database named “dellwyse” for PocketWeb Server :The account uses the default authentication plugin and clients must match the given password.
Mysql> CREATE DATABASE <DatabaseName> DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Notes: MySQL database name and table name are case sensitive in Linux. In Windows they are case insensitive.
5. Set access control permissions for user dellwyse.
Mysql> GRANT ALL PRIVILEGES ON *.* to '<UserName>'@'%' IDENTIFIED BY '<UserPassword>' WITH GRANT OPTION;Mysql> GRANT ALL PRIVILEGES ON *.* to '<UserName>'@'localhost' IDENTIFIED BY '<UserPassword>' WITH GRANT OPTION;
// Mysql> GRANT ALL PRIVILEGES ON *.* to '<UserName>'@'< concrete IP Address>' IDENTIFIED BY '<UserPassword>' WITH GRANT OPTION;
Note: User grant information can view in mysql database's user table.
Mysql> flush privileges;
- MySQL Base Configration Instructions
- Zynq Qt and Qwt Base Libraries-Build Instructions
- mysql base
- mysql-base
- mysql base funny sql
- MySQL-base-1
- Jboss Configration Memo
- PERL web server configration
- hibernate configration 双向关联
- Configration--获取屏幕属性
- spring中的@Configration详解
- 8086 instructions
- MMX Instructions
- SSE Instructions
- ARM Instructions
- jmp instructions
- Robot Instructions
- Robot Instructions
- 完美数简介及算法分析
- Linux服务器上安装使用Tomcat
- OpenStack使用Bosh部署CloudFoundry(八)—部署Mysql服务-V2 Broker
- Eclipse cocos2d-x Error:AndroidManifest.xml file missing
- sql基础学习
- MySQL Base Configration Instructions
- 自己写的一个js注册拖动对象的函数
- PHP的curl实现get,post 和 cookie(几个实例)
- VC 获取打印机与打印作业的状态
- C# - 在foreach中删除元素
- 避免文件被当做病毒而被查杀,将之添加到白名单
- hdu 1052 horse racing(贪心算法)
- 黑马程序员_java面向对象总结【1】(面向对象概述)
- Swing编程初步