[iyunv@jediael44 share]# mysql -u -root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.73 Source distribution
mysql>
默认情况下,mysql的root用户无密码,用以下方式创建密码
service mysqld stop
mysqld_safe --skip-grant-tables &
mysql -uroot -p 不输入密码直接回车
>use mysql;
> update user set password=PASSWORD("newpass")where user="root";更改密码为 newpassord
> flush privileges; 更新权限
> quit 退出
service mysqld restart
mysql -uroot -p
Forbidden
You don't have permission to access /phpmyadmin on this server.
解决方法:
在 phpMyAdmin 文件夹中找到 vi /etc/httpd/conf.d/phpMyAdmin.conf
在文件中能看到如下面一段配置
<Directory "c:/wamp/apps/phpmyadmin3.4.10.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
找到 Deny from all 意思是禁止所有访问,但允许从 127.0.0.1 访问
那么我们就删除 Allow from 127.0.0.1
并且把 Deny from all 修改为 Allow from all
意思就是允许从所有地址访问
然后 service httpd restart
四、WordPress配置
1、创建数据库
mysql> create database wordpress;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| wordpress |
+--------------------+
4 rows in set (0.00 sec)