Установил mySQL и phpmyadmin на Debian 6 x64
При установке пароль не попросил,я удивился...
Могу зайти в phpmyadmin только через debian-sys-maint
Мне нужно создать пользователя root со всеми правами.
[console]root@energypw:~# mysqld_safe --skip-grant-tables &
[2] 6549
root@energypw:~# 110428 10:51:52 mysqld_safe Logging to syslog.
110428 10:51:52 mysqld_safe A mysqld process already exists
mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.49-3 (Debian)
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> 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> UPDATE user SET Password=PASSWORD('12') WHERE user='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[2]+ Exit 1 mysqld_safe --skip-grant-tables
root@energypw:~#[/console]
Сделал Рестарт Мускула,пытаюсь зайти через phpmyadmin пишет:
Не удалось установить подключение для пользователя указанного в директиве controluser, с помощью параметров определенных в конфигурационном файле config.inc.php.
Вот содержание файла config.inc.php
<?php
/**
* Please, do not edit this file. The configuration file for Debian
* is located in the /etc/phpmyadmin directory.
*/
// Load secret generated on postinst
include('/var/lib/phpmyadmin/blowfish_secret.inc.php');
// Load autoconf local config
include('/var/lib/phpmyadmin/config.inc.php');
// Load user's local config
include('/etc/phpmyadmin/config.inc.php');
// Set the default server if there is no defined
if (!isset($cfg['Servers'])) {
$cfg['Servers'][1]['host'] = 'localhost';
}
// Set the default values for $cfg['Servers'] entries
for ($i=1; (!empty($cfg['Servers'][$i]['host']) || (isset($cfg['Servers'][$i]['connect_type']) && $cfg['Servers'][$i]['connect_type'] == 'socket')); $i++) {
if (!isset($cfg['Servers'][$i]['auth_type'])) {
$cfg['Servers'][$i]['auth_type'] = 'cookie';
}
if (!isset($cfg['Servers'][$i]['host'])) {
$cfg['Servers'][$i]['host'] = 'localhost';
}
if (!isset($cfg['Servers'][$i]['connect_type'])) {
$cfg['Servers'][$i]['connect_type'] = 'tcp';
}
if (!isset($cfg['Servers'][$i]['compress'])) {
$cfg['Servers'][$i]['compress'] = false;
}
if (!isset($cfg['Servers'][$i]['extension'])) {
$cfg['Servers'][$i]['extension'] = 'mysql';
}
}