zoukankan      html  css  js  c++  java
  • mysql数据库的安装和连接测试并给root用户赋密码

    一、mysql数据库的安装

    Windows下MySQL的配置

    以 MySQL 5.1 免安装版为例, 下载 mysql-noinstall-5.1.69-win32.zip ( 官方下载页: http://dev.mysql.com/downloads/mysql/5.1.html#downloads )

    1.打开mysql-5.0.18-win32文件夹,然后点击setup.exe

    2、点击next

    3、选取“custom”,点击next

    4、点击“change”,改变安装路径,然后点击next

    5、点击“install”后,等待几秒钟,出现图

    6、点next

    7、点next

    8、点“finish”,进入数据库配置

    9、点next

    10、点next

    11、选取“Server Machine”,点“next”

    12、点“next”

    13、点“next”

    14、点“next”

    15、点“next”

    16、选取“Manual Selected Default Character Set /Collation”,然后选取字符集为“GBK”,点“next”

    17、修改ServiceName mysql5018,点“next”(注:此处贵行需写的是mysql5018,因为现在你要装的是mysql 5.0.18版本的mysql)

     

    18、去掉“Modify Security Settings”选取,点Next

    19、点击Execute

    20、Mysql 安装完毕

    二、测试是否能连接上数据库,刚装好数据库没有密码

    →  Window+R 输入cmd 打开dos

    →  C:UsersDell>cd/

    →  C:>d:

    →  D:>cd D:Program FilesMySQLMySQL Server 5.0in

    →  D:Program FilesMySQLMySQL Server 5.0in>mysql -uroot

    Welcome to the MySQL monitor.  Commands end with ; or g.

    Your MySQL connection id is 3

    Server version: 5.0.45-community-nt MySQL Community Edition (GPL)

    Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

    →  mysql>

     三、给root用户添加密码root

    方法1:

    →  D:Program FilesMySQLMySQL Server 5.0in>mysqladmin -u root -p password
    Enter password: ****
    mysqladmin: Too few arguments to change password

    →  D:Program FilesMySQLMySQL Server 5.0in>mysql -u root -proot
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 9
    Server version: 5.0.45-community-nt MySQL Community Edition (GPL)

    Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

    →mysql>

  • 相关阅读:
    HDU1372,BFS象棋马走日
    看完一本小的算法书一个总结吧
    最小生成树Prim
    Junit单元测试的简单使用(主要是在spring框架下的项目)
    并查集
    最新最实用的公式技巧大汇总!
    这款Office密码破解工具,无坚不摧!
    有了它,友谊的船说不翻就不翻!
    Word公式装逼技巧,你绝对不会!
    为什么MathType窗口变灰色
  • 原文地址:https://www.cnblogs.com/shxkey/p/11211303.html
Copyright © 2011-2022 走看看