phpMyAdmin tentou se conectar ao servidor MySQL, e o servidor rejeitou a conexão do XAMPP

2

Oi eu pretendo conectar o phpMyAdmin, eu tenho o XAMPP, mas eu mudei a porta usando este guia

Não é possível iniciar o XAMPP no Ubuntu 11.10

Eu uso esse URL para inserir phpMyAdmin http://localhost:2145/phpmyadmin , mas recebo o seguinte erro

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

meu confic.inc.php é:

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['host'] = 'localhost:2145';
$cfg['Servers'][$i]['connect_type'] = 'cookie';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';

obrigado pela ajuda

editar

essa mudança resolve o erro para mim

$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;

É necessário também parar o mysql e iniciar o Xampp

sudo service mysql stop
/opt/lampp/lampp start
    
por oriaj 20.08.2015 / 18:30

1 resposta

1

Eu perdi agora 2 dias nisso. Finalmente eu tenho a solução remova xampp e instale mysql , phpmyadmin , php5 , apache2 manualmente.

sudo apt-get install apache2 mysql-server mysql-client php5 libapache2-mod-php5
apt-cache search php5

Depois escolha os que você precisa e instale-os assim:

apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo apt-get install phpmyadmin
sudo service apache2 restart

Agora você pode abrir o link

Estes comandos superiores farão o seu servidor xampp. Ele resolverá seu problema rapidamente e funcionará muito bem.

Graças a artigos relacionados:
1. Tutorial do servidor Ubuntu 14.10 LAMP com Apache 2, PHP 5 e MySQL (MariaDB)
2. Como eu altero o diretório-raiz do um servidor apache?

    
por alok 09.05.2016 / 20:51