• 1、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>

  • 相关阅读:
    AFNetworking 2.0 -1016错误解决办法
    dispatch_once创建单例
    ASIHTTPRequest 1.x:断点续传
    iOS开源项目汇总
    NSSearchPathForDirectoriesInDomains
    开源中国iOS客户端学习——(一)Prefix.pch文件
    UITableView 滚动条
    隐藏UITableView的滚动条以及修改滚动条的颜色,UITableView 滚动到指定行 section
    收藏几个支持中文的PHP字符串截取函数
    Cookie和Session
  • 原文地址:https://www.cnblogs.com/holly8/p/5575647.html
Copyright © 2020-2023  润新知