mysql以noinstall方式部署
2016-07-05 18:52
543 查看
部署过程中,将用mysqld命令配置好配置文件*.ini的位置,>mysqld --defaults-file=c:\sdk\mysql\my-default.ini --initialize;
编辑my.ini的基本配置,主要是basedir和datadir;
然后使用mysqld 命令初始化生成data文件夹,注意自动生成密码方式或者以无密码的方式初始化;
然后第一次运行mysql服务,可以在mysqld --console模式下,这样可以看到控制台的输出,>mysqld --console。注意运行成功的提示是Version: '5.7.10' socket: '' port: 3306 MySQL Community Server (GPL)。
打开新的cmd窗口,连接服务端,测试连接和服务端是否正常,使用自动生成的密码连接,时间间隔比较久会出现如下密码过期限制连接提示:
C:\sdk\mysql\bin>mysqlshow -u root
Enter password: ************
mysqlshow: Your password has expired. To log in you must change it using a client that supports expired passwords.
可以通过这样的方式更改密码:
C:\sdk\mysql\bin>mysqladmin -u root -p password
Enter password: ************
New password: ****
Confirm new password: ****
Warning: Since password will be sent to server in plain text, use ssl connection
to ensure password safety.
如果能连接mysql,也可以用这种方式更改密码:
mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password'
更改了密码,再测试mysql数据库服务连接如下,就成功了:
C:\sdk\mysql\bin>mysqlshow -u root -p
Enter password: ****
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
编辑my.ini的基本配置,主要是basedir和datadir;
然后使用mysqld 命令初始化生成data文件夹,注意自动生成密码方式或者以无密码的方式初始化;
然后第一次运行mysql服务,可以在mysqld --console模式下,这样可以看到控制台的输出,>mysqld --console。注意运行成功的提示是Version: '5.7.10' socket: '' port: 3306 MySQL Community Server (GPL)。
打开新的cmd窗口,连接服务端,测试连接和服务端是否正常,使用自动生成的密码连接,时间间隔比较久会出现如下密码过期限制连接提示:
C:\sdk\mysql\bin>mysqlshow -u root
Enter password: ************
mysqlshow: Your password has expired. To log in you must change it using a client that supports expired passwords.
可以通过这样的方式更改密码:
C:\sdk\mysql\bin>mysqladmin -u root -p password
Enter password: ************
New password: ****
Confirm new password: ****
Warning: Since password will be sent to server in plain text, use ssl connection
to ensure password safety.
如果能连接mysql,也可以用这种方式更改密码:
mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password'
更改了密码,再测试mysql数据库服务连接如下,就成功了:
C:\sdk\mysql\bin>mysqlshow -u root -p
Enter password: ****
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
相关文章推荐
- Mysql命令大全
- MySQL删除单列重复或多列同时重复值并保留一条
- MySQL的数据类型【总结】
- MySQL索引类型总结和使用技巧以及注意事项
- MySQL 一键生成wiki、protobuf等
- vs中如何配置连接mysql数据库
- codeigniter 配置 database 出现 Call to undefined function mysqli_init 异常
- mysql sql语句大全
- MySQL数据库优化
- mysql limit 分页
- Mysql命令大全
- MySQL之【钻石】抢购风暴
- 修改mysql编码方式
- logstash parse mysql log
- mysql重置root密码
- mysql编码设置
- mysql中文乱码终结解决
- MySQL存储引擎InnoDB与Myisam
- MySQL 索引介绍 属性介绍 注意事项
- mysql主从复制配置记录