Install MySQL 5.7 Enterprise Server in 10 minutes
2016-04-22 11:09
477 查看
# Download the enterprise/commercial version of MySQL (zip installer) from official site.
# Extract it to C:/mysql
# Make a default config file C:/my.ini containing the following content:
[mysqld]
basedir=C:/mysql
datadir=C:/mysql/data
max_connections=500
# Create the data directory i.e C:/mysql/data
# Initialize the data directtory:
C:/mysql/bin/mysqld --defaults-file=C:/my.ini --initialize --console
# Try to start the server:
C:/mysql/bin/mysqld --console
It will create a random password for the user 'root'@'localhost', record it.
# Now we must change the temporary password:
C:/mysql/bin/mysql -u root -p
enter the random password, then
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
mysql> exit
# Shutdown the server:
C:/mysql/bin/mysqladmin -u root -p shutdown
# Install mysqld as a Windows service:
C:/mysql/bin/mysqld --install
# Go to Control Panel - Administration Tools - services, start the service MySQL
# Start the client to create databases and users:
C:/mysql/bin/mysql -u root -p
mysql> create database db1
mysql> create database db2
mysql> create user 'user1'@'localhost' identified by 'User@123';
mysql> create user 'user1'@'%' identified by 'User@123';
mysql> grant all privileges on *.* to 'user1'@'localhost' with grant option;
mysql> grant all privileges on *.* to 'user1'@'%' with grant option;
mysql> exit
# You are all set to connect to "jdbc:mysql://myhost:3306/db1?jdbcCompliantTruncation=false" with the user user1
# Extract it to C:/mysql
# Make a default config file C:/my.ini containing the following content:
[mysqld]
basedir=C:/mysql
datadir=C:/mysql/data
max_connections=500
# Create the data directory i.e C:/mysql/data
# Initialize the data directtory:
C:/mysql/bin/mysqld --defaults-file=C:/my.ini --initialize --console
# Try to start the server:
C:/mysql/bin/mysqld --console
It will create a random password for the user 'root'@'localhost', record it.
# Now we must change the temporary password:
C:/mysql/bin/mysql -u root -p
enter the random password, then
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
mysql> exit
# Shutdown the server:
C:/mysql/bin/mysqladmin -u root -p shutdown
# Install mysqld as a Windows service:
C:/mysql/bin/mysqld --install
# Go to Control Panel - Administration Tools - services, start the service MySQL
# Start the client to create databases and users:
C:/mysql/bin/mysql -u root -p
mysql> create database db1
mysql> create database db2
mysql> create user 'user1'@'localhost' identified by 'User@123';
mysql> create user 'user1'@'%' identified by 'User@123';
mysql> grant all privileges on *.* to 'user1'@'localhost' with grant option;
mysql> grant all privileges on *.* to 'user1'@'%' with grant option;
mysql> exit
# You are all set to connect to "jdbc:mysql://myhost:3306/db1?jdbcCompliantTruncation=false" with the user user1
相关文章推荐
- ERROR 1130: Host '' is not allowed to connect to this MySQL server
- 4000 MySQL5.7多源复制(Multi-Source Replication)
- Windows 下连接mysql工具NavicatForMysql
- cnetos7安装mysqlsla
- Mysql函数汇总
- Emoji表情符号录入MySQL数据库报错的解决方案
- MySQL编译安装
- MySQL集群搭建
- 四种mysql存储引擎
- mysql存储过程加事务
- 很全面的Mysql数据库、数据库表、数据基础操作笔记(含代码)
- MySql数据基本操作sql语句
- 用distinct在MySQL中查询多条不重复记录值
- mysql视图学习总结
- mysql教程导出数据库教程几种方法
- mysql 5.7 版本,密码无法登陆,更改密码时出现ERROR 1054 (42S22): Unknown column 'password' in 'fie
- MySQL安装过程net start mysql 启动失败 报“错误2,系统找不到文件”的解决办法
- 青云 ubuntu下mysql远程连接配置
- MySQL的limit优化
- mysql性能优化