用fedora 15自带的yum安装方式:
只要在终端里输入:yum -y install mysql-server ,系统自动下载和安装Mysql的,
chkconfig --add mysqld 在服务清单中添加mysql服务
service mysqld start 服务启动
mysqladmin -u root password 'newpassword' 更改密码
mysql -u root -p
Enter password:输入刚才更改的密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.5.13 MySQL Community Server (GPL)
Copyright (c) 2000, 2010, 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 |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> use test; 使用test数据库
mysql> show tables; 查询test数据库所有表
Empty set (0.00 sec)
要使数据库支持中文,还要修改一个文件:
vi /etc/my.cnf
增加一项:character_set_server=utf8