• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

Ubuntu10.04装配mysql

mysql 搞代码 7年前 (2018-06-04) 108次浏览 已收录 0个评论

Ubuntu10.04安装mysql

安装步骤:

 

       命令如下:

apt-get install mysql-server

apt-get install mysql-client

安装时,会提示你设定root密码

Ubuntu10.04装配mysql

重复密码:

Ubuntu10.04装配mysql

 

部署步骤:

 

       设置 mysql root 访问密码:

 

mysqladmin -uroot password <password>

 

启动 mysql 服务

   /etc/init.d/mysql start service mysql start

停止 mysql 服务  

   /etc/init.d/mysql stop service mysql stop

重启 mysql 服务  

   /etc/init.d/mysql restart service mysql restart

 

 

进入 mysql 数据库  

mysql -uroot –p

根据提示输入 root 访问密码 , 显示如下信息,表明可以开始 mysql 操作:


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

Your MySQL connection id is 1

Server version: 5.1.50-community-log MySQL Community Server (GPL)

 

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL v2 license

 

Type ‘help;’ or ‘/h’ for help. Type ‘/c’ to clear the current input statement.

 

mysql>

 

       ubuntu10.4系统中不需要设置mysql自启动,安装时候已经作为service。

       所以一启动ubuntu系统,mysql服务自动启动。

1 楼 liukai 2010-11-04  
设置 mysql root 访问密码:
mysqladmin -uroot password <password>
中间少了个 -p
所以全文应该是
mysqladmin -uroot -p password <password>

2 楼 黑暗浪子 2010-11-04  
liukai 写道
设置 mysql root 访问密码:
mysqladmin -uroot password <password>
中间少了个 -p
所以全文应该是
mysqladmin -uroot -p password <password>

多谢


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Ubuntu10.04装配mysql
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址