注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

艾伯特的鸟屋

 
 
 

日志

 
 

fedora17下安装mysql  

2012-08-16 23:27:36|  分类: linux |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
fedora17下安装mysql
#安装MySQL,客户端和服务器
$sudo yum install mysql mysql-server
#设置MySQL服务器的服务程序自自动
$sudo systemctl enable mysqld.service
$sudo systemctl start mysqld.service

#MySQL的初始安全设置
$sudo mysql_secure_installation

#测试MySQL
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.5.25a MySQL Community Server (GPL)

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

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.01 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
| func                      |
| general_log               |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| ndb_binlog_index          |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| servers                   |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
24 rows in set (0.00 sec)

mysql> select user,host,password from mysql.user;
+------+-----------+-------------------------------------------+
| user | host      | password                                  |
+------+-----------+-------------------------------------------+
| root | localhost | *11113147111E01111501A9CE011117D5D1B63431 |
| root | 127.0.0.1 | *11113147111E01111501A9CE011117D5D1B63431 |
| root | ::1       | *11113147111E01111501A9CE011117D5D1B63431 |
+------+-----------+-------------------------------------------+
3 rows in set (0.00 sec)

mysql> exit
Bye
$

#设置防火墙3306端口
$sudo gedit /etc/sysconfig/iptables
#增加一行:在commit之前
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
$sudo service iptables restart
  评论这张
 
阅读(70)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017