Ошибка phpmyadmin невозможно подключиться к серверу mysql

We have installed PHPMyAdmin on a windows machine running IIS 7.0.
We are able to connect to MySQL using command-line, But we are not able to connect using PHPMyAdmin.
The error displayed is: Error #1045 Cannot log in to the MySQL server.
Can somebody please help?

PHP Version 5.4.0
mysqlnd 5.0.10 - 20111026 - $Revision: 323634 $
phpMyAdmin-3.5.4-rc1-all-languages.7z

EDIT :
I followed the link below with no success, mean i changed that password but phpmyadmin still has that error…
C.5.4.1.1. Resetting the Root Password: Windows Systems

Also there is thread like below in stack with no help :
Random error: #1045 Cannot log in to the MySQL server
but that error is not random -> i always have that error…

And this is config.inc.php file in phpmyadmin folder:

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Config file view and save screen
 *
 * @package PhpMyAdmin-setup
 */

if (!defined('PHPMYADMIN')) {
    exit;
}

/**
 * Core libraries.
 */
require_once './libraries/config/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';
require_once './setup/lib/ConfigGenerator.class.php';

$config_readable = false;
$config_writable = false;
$config_exists = false;
check_config_rw($config_readable, $config_writable, $config_exists);
?>
<h2><?php echo __('Configuration file') ?></h2>
<?php display_form_top('config.php'); ?>
<input type="hidden" name="eol" value="<?php echo htmlspecialchars(PMA_ifSetOr($_GET['eol'], 'unix')) ?>" />
<?php display_fieldset_top('', '', null, array('class' => 'simple')); ?>
<tr>
    <td>
        <textarea cols="50" rows="20" name="textconfig" id="textconfig" spellcheck="false"><?php
            echo htmlspecialchars(ConfigGenerator::getConfigFile())
        ?></textarea>
    </td>
</tr>
<tr>
    <td class="lastrow" style="text-align: left">
        <input type="submit" name="submit_download" value="<?php echo __('Download') ?>" class="green" />
        <input type="submit" name="submit_save" value="<?php echo __('Save') ?>"<?php if (!$config_writable) echo ' disabled="disabled"' ?> />
    </td>
</tr>
<?php
display_fieldset_bottom_simple();
display_form_bottom();
?>

where part of these codes should i change?

Thanks.

Community's user avatar

asked Nov 13, 2012 at 8:30

SilverLight's user avatar

SilverLightSilverLight

19.6k65 gold badges191 silver badges299 bronze badges

In Linux I resolve this problem by going to the root command prompt type:

# mysqladmin -u root password 'Secret Phrase Here'

Then go back and login. Works every time!

answered Jun 26, 2013 at 9:44

Jerry Nettrouer II's user avatar

1

You need to do two additional things after following the link that you have mentioned in your post:

One have to map the changed login cridentials in phpmyadmin’s config.inc.php

and second, you need to restart your web and mysql servers..

php version is not the issue here..you need to go to phpmyadmin installation directory and find file config.inc.php and in that file put your current mysql password at line

$cfg['Servers'][$i]['user'] = 'root'; //mysql username here
$cfg['Servers'][$i]['password'] = 'password'; //mysql password here

answered Nov 13, 2012 at 9:01

000's user avatar

000000

3,9664 gold badges25 silver badges39 bronze badges

8

If you are installing first time then please try login with username and password as root

answered Nov 3, 2013 at 9:23

Akeel's user avatar

AkeelAkeel

511 silver badge3 bronze badges

another thing that worked for me after everything didn’t — change «localhost» in config.inc.php to 127.0.0.1

answered Aug 13, 2015 at 18:47

ItamarBe's user avatar

ItamarBeItamarBe

4821 gold badge5 silver badges12 bronze badges

In mysql 5.7 the auth mechanism changed, documentation can be found in the official manual here.

Using the system root user (or sudo) you can connect to the mysql database with the mysql ‘root’ user via CLI.
All other users will work, too.

In phpmyadmin however, all mysql users will work, but not the mysql ‘root’ user.

This comes from here:

$ mysql -Ne "select Host,User,plugin from mysql.user where user='root';"
+-----------+------+-----------------------+
| localhost | root | auth_socket |
|  hostname | root | mysql_native_password |
+-----------+------+-----------------------+

To ‘fix’ this security feature, do:

mysql -Ne "update mysql.user set plugin='mysql_native_password' where User='root' and Host='localhost'; flush privileges;"

More on this can also be found here in the manual.

answered Jun 7, 2016 at 18:25

sjas's user avatar

sjassjas

18.5k13 gold badges87 silver badges92 bronze badges

For ubuntu users, your config.inc.php file should be like this

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'username';
$cfg['Servers'][$i]['password'] = 'password';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/**
 * phpMyAdmin configuration storage settings.
 */
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = '';

answered Feb 3, 2017 at 7:33

MeVimalkumar's user avatar

MeVimalkumarMeVimalkumar

3,1832 gold badges15 silver badges25 bronze badges

When you change your passwords in the security tab, there are two sections, one above and one below. I think the common mistake here is that others try to log-in with the account they have set «below» the one used for htaccess, whereas they should log in to the password they set on the above section. That’s how I fixed mine.

answered Aug 3, 2015 at 14:42

carl dallo's user avatar

a number of answers; check out this one also; make sure that no instance of mysql is running, always brought by not ending your sessions well. get the super user rights with

sudo su

and type your password when prompted to (remember nothing appears when you type your password, so, don’t worry just type it and press enter). Next go to your terminal and stop all mysql instances:

/etc/init.d/mysql stop

after that, go and restart the mysql services (or restart xampp as a whole). This solved my problem. All the best.

answered Mar 20, 2019 at 10:21

alan's user avatar

alanalan

816 bronze badges

0

If you logged into «phpmyadmin», then logged out, you might have trouble attempting to log back in on the same browser window. The logout sends the browser to a URL that looks like this:

http://localhost/phpmyadmin/index.php?db=&token=354a350abed02588e4b59f44217826fd&old_usr=tester

But for me, on Mac OS X in Safari browser, that URL just doesn’t want to work. Therefore, I have to put in the clean URL:

http://localhost/phpmyadmin

Don’t know why, but as of today, Oct 20, 2015, that is what I am experiencing.

answered Oct 20, 2015 at 17:26

IAM_AL_X's user avatar

IAM_AL_XIAM_AL_X

1,20111 silver badges12 bronze badges

sudo service mysql stop

sudo mysqld --skip-grant-tables &

mysql -u root mysql

Change MYSECRET with your new root password

UPDATE user SET Password=PASSWORD('MYSECRET') WHERE User='root'; FLUSH PRIVILEGES; exit;

sjas's user avatar

sjas

18.5k13 gold badges87 silver badges92 bronze badges

answered Apr 4, 2016 at 6:36

user6154517's user avatar

I installed wamp.phpmyadmin working fine. Now that I have installed mysql command line client I am not able to connect to my databases from mysql command line or phpmyadmin. After restarting I could not access phpmyadmin #1045 Cannot log in to the MySQL server. In addition to that my mysql command line not accepting my password and rejects my config files:

C:wampbinmysqlmysql5.5.24

my.ini

port=3306

my config.inc.php

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'whtevr';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

httpd.conf

listen port:80

C:Program FilesMySQLMySQL Server 5.0

my.ini

port:3306

Again, I reinstalled mysql command line with port changed to 3307

port:3307

WAMP works fine accessing all the databases but from mysql command line client I could not access all my databases. It is only showing show databases;

information_schema 
mysql 
test

Jason's user avatar

Jason

15k23 gold badges85 silver badges116 bronze badges

asked Jan 2, 2014 at 16:43

black's user avatar

3

In case MySQL Server is up but you are still getting the error:

For anyone who still have this issue,
I followed awesome tutorial http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-9-mavericks/

However i still got #1045 error.
What really did the trick was to change localhost to 127.0.0.1 at your config.inc.php. Why was it failing if locahost points to 127.0.0.1? I don’t know. But it worked.

===== EDIT =====

Long story short, it is because of permissions in mysql. It may be set to accept connections from 127.0.0.1 but not from localhost.

The actual answer for why this isn’t responding is here:
https://serverfault.com/a/297310

Community's user avatar

answered Jul 2, 2015 at 16:51

JGutierrezC's user avatar

JGutierrezCJGutierrezC

4,3785 gold badges24 silver badges42 bronze badges

2

I was experiencing the same problem on OS X. I’ve solved it now. I post my solution here for anyone who has the similar issue.

Firstly, I set the password for root in mysql client:

shell> mysql -u root
mysql> FLUSH PRIVILEGES;
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MY_PASSWORD');

Then, I checked the version info:

shell> /usr/local/mysql/bin/mysqladmin -u root -p version
...
Server version    5.6.26
Protocol version  10
Connection        Localhost via UNIX socket
UNIX socket       /tmp/mysql.sock
Uptime:           11 min 0 sec
...

Finally, I changed the connect_type parameter from tcp to socket and added the parameter socket in config.inc.php:

$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';

answered Sep 8, 2015 at 11:05

micmia's user avatar

micmiamicmia

1,3611 gold badge14 silver badges29 bronze badges

1

If you reinstalled the server it means that that the new installation most likely overwrote your username and passwords. (You might want to try loggin without a password see if it works).

If it is a clean install you need to set the root password .

Otherwise, you will need to reset root permissions.

answered Jan 2, 2014 at 17:21

Ares's user avatar

AresAres

5,9053 gold badges35 silver badges51 bronze badges

Go to phpMyAdmin Directory of your Localhost Software Like Xampp, Mamp or others. Then change the host from localhost to 127.0.0.1 and change the port to 3307 . After that go to your data directory and delete all error log files except ibdata1 which is important file to hold your created database table link. Finaly restart mysql.I think your problem will be solved.

answered Aug 3, 2015 at 13:04

Shuvojit Saha's user avatar

I just solved this error for myself, but it was a bit silly on my part. Still worth checking if the above doesn’t help you.

In my case, I was editing the config files in /etc/phpmyadmin, my install was located in /usr/share/phpmyadmin, and my install was not actually opening the /etc/phpmyadmin config files, as I thought it would. So I just did this command:

ln -s /etc/phpmyadmin/conf* /usr/share/phpmyadmin

For those not in the know, ln -s makes a soft link (basically a shortcut). So that command just makes shortcuts from the config files in /etc to the /usr/share install.

By the way, I figured this out after using the program opensnoop, which shows you what files are being opened (technically, traces open() syscalls and the pid of the process, as they happen), which you can install on Ubuntu with apt-get install perf-tools-unstable, or you can get it here.

answered Jan 13, 2016 at 4:37

apricot boy's user avatar

apricot boyapricot boy

1212 silver badges4 bronze badges

I also had this error. It worked normally after I clean up the cookies.

Tunaki's user avatar

Tunaki

132k46 gold badges332 silver badges419 bronze badges

answered Dec 4, 2014 at 9:35

藍劍樟's user avatar

1

After like three (3) hours of google..ing.This is the solution to the problem:
First, I run this command;

$mysqladmin -u root -p[your root password here] version
Which outputs:

    Copyright (c) 2000, 2016, 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.

    Server version      5.5.49-0ubuntu0.14.04.1
    Protocol version    10
    Connection      Localhost via UNIX socket
    UNIX socket     /var/run/mysqld/mysqld.sock
    Uptime:         1 hour 54 min 3 sec

Finally, I changed the connect_type parameter from tcp to socket and added the parameter socket in config.inc.php:

    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['connect_type'] = 'socket';
    $cfg['Servers'][$i]['socket'] = '/var/run/mysqld/mysqld.sock';

All credit goes to this person:
This is the correct solution

Community's user avatar

answered Jan 31, 2017 at 16:50

Meshack Mbuvi's user avatar

You have to go into your mySQL settings and change the settings to Legacy authentication. I use mysql community installer and it allows you to go back and reconfigure the settings.
Create a new user, and choose standard authentication, choose a password, thats it.
Its that simple!!!

answered Jan 18, 2019 at 21:26

Mike Przybylski's user avatar

Since the username and password is added in config.inc.php, you need to change:

$cfg['Servers'][$i]['auth_type'] = 'cookie';

TO:

$cfg['Servers'][$i]['auth_type'] = 'config';

And save the file.

You will then need to restart WAMP after making the above changes.

answered Jul 22, 2015 at 20:03

AndrewL64's user avatar

AndrewL64AndrewL64

15.7k8 gold badges46 silver badges79 bronze badges

I also had this error once, but only with one specific user. So what I did is remove the user and re-create it with the same name and password.

Then after I re-imported the database, it worked.

answered Aug 13, 2016 at 23:22

bytecode77's user avatar

bytecode77bytecode77

14k30 gold badges110 silver badges141 bronze badges

I would suggest 3 things:

  1. First try clearing browser’s cache
  2. Try to assign username & password statically into config.inc.php
  3. Once you’ve done with installation, delete the config.inc.php file under «phpmyadmin» folder

The last one worked for me.

answered Mar 10, 2017 at 8:54

Tanmoy Kundu's user avatar

Adding the following $cfg helps to narrow down the problem

$cfg['Error_Handler']['display'] = true;
$cfg['Error_Handler']['gather'] = true;

Don’t forget to remove those $cfg after done debugging!

answered Mar 9, 2018 at 8:07

Yohanip's user avatar

Every once in a while, and this isn’t often, but every once in a while, there’s a typo in your password. A subtle difference between an upper and lower case letter, for example. I went through many, many of these solutions.

I had simply mistyped the password, and it was saved to my browser, so I didn’t think to check it again.

Since this error CAN be caused by a missed password, just double-check before you go on this quest.

answered Jun 7, 2020 at 20:03

David's user avatar

DavidDavid

314 bronze badges

Before you start, go to the directory «phpMyAdmin» preferably the one in your localhost, clear all of your cookies, and have your sql running by entering:

sudo /usr/local/mysql/support-files/mysql.server start

To fix the error , you will have to run the following commands in your terminal:

export PATH=$PATH:/usr/local/mysql/bin/

then:

mysql -u root

after which, you’ll need to change your permissions inside the mySQL shell:

UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;

Refresh your phpMyAdmin window, re-enter the «root» username (or whichever is applicable), and your password and you should be good to go.
Check http://machiine.com/2013/how-to-setup-phpmyadmin-on-a-mac-with-osx-10-8-mamp-part-3/ if you are willing to set up from scratch.

answered Nov 8, 2014 at 2:21

Cos's user avatar

0

We have installed PHPMyAdmin on a windows machine running IIS 7.0.
We are able to connect to MySQL using command-line, But we are not able to connect using PHPMyAdmin.
The error displayed is: Error #1045 Cannot log in to the MySQL server.
Can somebody please help?

PHP Version 5.4.0
mysqlnd 5.0.10 - 20111026 - $Revision: 323634 $
phpMyAdmin-3.5.4-rc1-all-languages.7z

EDIT :
I followed the link below with no success, mean i changed that password but phpmyadmin still has that error…
C.5.4.1.1. Resetting the Root Password: Windows Systems

Also there is thread like below in stack with no help :
Random error: #1045 Cannot log in to the MySQL server
but that error is not random -> i always have that error…

And this is config.inc.php file in phpmyadmin folder:

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Config file view and save screen
 *
 * @package PhpMyAdmin-setup
 */

if (!defined('PHPMYADMIN')) {
    exit;
}

/**
 * Core libraries.
 */
require_once './libraries/config/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';
require_once './setup/lib/ConfigGenerator.class.php';

$config_readable = false;
$config_writable = false;
$config_exists = false;
check_config_rw($config_readable, $config_writable, $config_exists);
?>
<h2><?php echo __('Configuration file') ?></h2>
<?php display_form_top('config.php'); ?>
<input type="hidden" name="eol" value="<?php echo htmlspecialchars(PMA_ifSetOr($_GET['eol'], 'unix')) ?>" />
<?php display_fieldset_top('', '', null, array('class' => 'simple')); ?>
<tr>
    <td>
        <textarea cols="50" rows="20" name="textconfig" id="textconfig" spellcheck="false"><?php
            echo htmlspecialchars(ConfigGenerator::getConfigFile())
        ?></textarea>
    </td>
</tr>
<tr>
    <td class="lastrow" style="text-align: left">
        <input type="submit" name="submit_download" value="<?php echo __('Download') ?>" class="green" />
        <input type="submit" name="submit_save" value="<?php echo __('Save') ?>"<?php if (!$config_writable) echo ' disabled="disabled"' ?> />
    </td>
</tr>
<?php
display_fieldset_bottom_simple();
display_form_bottom();
?>

where part of these codes should i change?

Thanks.

Community's user avatar

asked Nov 13, 2012 at 8:30

SilverLight's user avatar

SilverLightSilverLight

19.6k65 gold badges191 silver badges299 bronze badges

In Linux I resolve this problem by going to the root command prompt type:

# mysqladmin -u root password 'Secret Phrase Here'

Then go back and login. Works every time!

answered Jun 26, 2013 at 9:44

Jerry Nettrouer II's user avatar

1

You need to do two additional things after following the link that you have mentioned in your post:

One have to map the changed login cridentials in phpmyadmin’s config.inc.php

and second, you need to restart your web and mysql servers..

php version is not the issue here..you need to go to phpmyadmin installation directory and find file config.inc.php and in that file put your current mysql password at line

$cfg['Servers'][$i]['user'] = 'root'; //mysql username here
$cfg['Servers'][$i]['password'] = 'password'; //mysql password here

answered Nov 13, 2012 at 9:01

000's user avatar

000000

3,9664 gold badges25 silver badges39 bronze badges

8

If you are installing first time then please try login with username and password as root

answered Nov 3, 2013 at 9:23

Akeel's user avatar

AkeelAkeel

511 silver badge3 bronze badges

another thing that worked for me after everything didn’t — change «localhost» in config.inc.php to 127.0.0.1

answered Aug 13, 2015 at 18:47

ItamarBe's user avatar

ItamarBeItamarBe

4821 gold badge5 silver badges12 bronze badges

In mysql 5.7 the auth mechanism changed, documentation can be found in the official manual here.

Using the system root user (or sudo) you can connect to the mysql database with the mysql ‘root’ user via CLI.
All other users will work, too.

In phpmyadmin however, all mysql users will work, but not the mysql ‘root’ user.

This comes from here:

$ mysql -Ne "select Host,User,plugin from mysql.user where user='root';"
+-----------+------+-----------------------+
| localhost | root | auth_socket |
|  hostname | root | mysql_native_password |
+-----------+------+-----------------------+

To ‘fix’ this security feature, do:

mysql -Ne "update mysql.user set plugin='mysql_native_password' where User='root' and Host='localhost'; flush privileges;"

More on this can also be found here in the manual.

answered Jun 7, 2016 at 18:25

sjas's user avatar

sjassjas

18.5k13 gold badges87 silver badges92 bronze badges

For ubuntu users, your config.inc.php file should be like this

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'username';
$cfg['Servers'][$i]['password'] = 'password';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/**
 * phpMyAdmin configuration storage settings.
 */
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = '';

answered Feb 3, 2017 at 7:33

MeVimalkumar's user avatar

MeVimalkumarMeVimalkumar

3,1832 gold badges15 silver badges25 bronze badges

When you change your passwords in the security tab, there are two sections, one above and one below. I think the common mistake here is that others try to log-in with the account they have set «below» the one used for htaccess, whereas they should log in to the password they set on the above section. That’s how I fixed mine.

answered Aug 3, 2015 at 14:42

carl dallo's user avatar

a number of answers; check out this one also; make sure that no instance of mysql is running, always brought by not ending your sessions well. get the super user rights with

sudo su

and type your password when prompted to (remember nothing appears when you type your password, so, don’t worry just type it and press enter). Next go to your terminal and stop all mysql instances:

/etc/init.d/mysql stop

after that, go and restart the mysql services (or restart xampp as a whole). This solved my problem. All the best.

answered Mar 20, 2019 at 10:21

alan's user avatar

alanalan

816 bronze badges

0

If you logged into «phpmyadmin», then logged out, you might have trouble attempting to log back in on the same browser window. The logout sends the browser to a URL that looks like this:

http://localhost/phpmyadmin/index.php?db=&token=354a350abed02588e4b59f44217826fd&old_usr=tester

But for me, on Mac OS X in Safari browser, that URL just doesn’t want to work. Therefore, I have to put in the clean URL:

http://localhost/phpmyadmin

Don’t know why, but as of today, Oct 20, 2015, that is what I am experiencing.

answered Oct 20, 2015 at 17:26

IAM_AL_X's user avatar

IAM_AL_XIAM_AL_X

1,20111 silver badges12 bronze badges

sudo service mysql stop

sudo mysqld --skip-grant-tables &

mysql -u root mysql

Change MYSECRET with your new root password

UPDATE user SET Password=PASSWORD('MYSECRET') WHERE User='root'; FLUSH PRIVILEGES; exit;

sjas's user avatar

sjas

18.5k13 gold badges87 silver badges92 bronze badges

answered Apr 4, 2016 at 6:36

user6154517's user avatar

Поставил xampp на mac os. Захожу по адресу localhost/phpmyadmin и вижу это
71beee80b1e94dc180217f0ccfd69b34.png

почитал в интернете, посоветовали в config.default.php прописать следующее:

$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '123456';

Но ничего не помогло.
Кто подскажет в чем дело? Спасибо

_____
Если в config.inc.php закомментировать
$cfg[‘Servers’][$i][‘auth_type’] = ‘config’;
то появится окно авторизации, но при нажатии на «Войти» появляется сообщение
Невозможно подключиться к серверу MySQL
3ee688d3cf544f91a7608d5f15c52b3f.png

(apache)
config.inc.php

<?php
$cfg['blowfish_secret'] = 'xampp';

$i = 0;


$i++;
$cfg['Servers'][$i]['auth_type'] = 'config';
$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;
$cfg['Servers'][$i]['pmadb'] = null;
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
//$cfg['Servers'][$i]['controluser'] = 'pma';
//$cfg['Servers'][$i]['controlpass'] = '';

/* Storage database and tables */
//$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
//$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
//$cfg['Servers'][$i]['relation'] = 'pma__relation';
//$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
//$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
//$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
//$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
//$cfg['Servers'][$i]['history'] = 'pma__history';
//$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
//$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
//$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
//$cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

//$cfg['RowActionType'] = 'both';


//$cfg['ShowAll'] = true;


//$cfg['MaxRows'] = 50;

//$cfg['ProtectBinary'] = 'false';

//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';

//$cfg['PropertiesNumColumns'] = 2;

//$cfg['QueryHistoryDB'] = true;

//$cfg['QueryHistoryMax'] = 100;

//$cfg['SendErrorReports'] = 'ask';

?>

Update
9a8a47d66c044ca4a808bc9b2e485e1e.png

  • Печать

Страницы: [1] 2  Все   Вниз

Тема: PhpMyAdmin #1045 Невозможно подключиться к серверу MySQL  (Прочитано 145907 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
Bling-Bling

Не могу разобраться почему почему не пускает в PhpMyAdmin, ошибка #1045 Невозможно подключиться к серверу MySQL.
Подскажите где в конфигах посмотреть пользователя и пароль на вход в PhpMyAdmin?


Оффлайн
gregory5

« Последнее редактирование: 24 Февраля 2011, 14:25:15 от gregory5 »


Оффлайн
Bling-Bling

ЭЭэээ…. дело в том что гуглил и это читал.
После ввода пароля проваливаюсь в пустую страничку  

а если пароль ввести не верно, то получаю ошибку  #1045 Невозможно подключиться к серверу MySQL

через консоль в mysql пускает

« Последнее редактирование: 24 Февраля 2011, 17:24:12 от Bling-Bling »

 10.10


Оффлайн
geka_ubuntu

После установки mysql — подключитесь к серверу:

mysql -u root

в терминале отобразится сообщение:

Welcome…

установите пароль на root (например — 000000):

set password for root@localhost=password(‘000000’);

после загрузите PhpMyAdmin и введите соответствующие логин и пароль…

дело в том что PhpMyAdmin — не разрешает вход без пароля

« Последнее редактирование: 05 Марта 2011, 16:07:35 от geka_ubuntu »


Оффлайн
pashulka

***@***:~$ sudo mysql -u root
Вывод:

ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)

А в таком случае что делать?


Оффлайн
drako


Оффлайн
AnrDaemon

mysql -u root -p

Топик читать пробовал?

ЭЭэээ…. дело в том что гуглил и это читал.
После ввода пароля проваливаюсь в пустую страничку 

а если пароль ввести не верно, то получаю ошибку  #1045 Невозможно подключиться к серверу MySQL

через консоль в mysql пускает

Была такая проблема… версия PMA какая?

Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…


Оффлайн
VinnyPooh

Давайте культурнее к друг другу обращаться,  AnrDaemon хоть и резок на язык бывает, но прав, отвечающие, читайте внимательно тему.


Оффлайн
sssats

Возможно пригодится кому-то в будущем. Такая-же проблема была. Оказалось что когда вводил пароль в консоли ввел на русском, на консоль восприняла как «????» поэтому в web-морду не могло зайти ни русскими не английскими. Через консоль вошел ввоодя на русском и сменил пароль.


Оффлайн
bumctik

mysql -u root -p

что делать если даже после того как пароль вводишь и жмешь Enter
все равно терминал возвращает

Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

===========================================================
Пользователи убунты не знают о существовании других дистров.
Они считают, что Ubuntu — это и есть линукс, единственный и неповторимый.


Оффлайн
fisher74

Вспоминать правильный пароль мускульного root-а. Если не вспоминается — «сбрасывать».


Оффлайн
bumctik

Вспоминать правильный пароль мускульного root-а. Если не вспоминается — «сбрасывать».

проблема в том, что я не могу забыть только что установленный (при установке) пароль на MYSQl
тут видимо проблема в другом, есть какой-то баг

и как сбросить пароль root?

===========================================================
Пользователи убунты не знают о существовании других дистров.
Они считают, что Ubuntu — это и есть линукс, единственный и неповторимый.


Оффлайн
fisher74

и как сбросить пароль root?

Примерно так

sudo service mysqld stop
/usr/bin/mysqld_safe --skip-grant-tables --user=root &
mysql -u root
UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root';
FLUSH PRIVILEGES;
q
sudo service mysqld restart


Оффлайн
bumctik

да это все пробовал все равно не помогло…полностью снес все под 0 и заново поставил, и заработало (LAMP) из коробки

===========================================================
Пользователи убунты не знают о существовании других дистров.
Они считают, что Ubuntu — это и есть линукс, единственный и неповторимый.


mirzayaky

 #2002 Невозможно подключиться к серверу MySQL

aleksandr@aleksandr-laptop:~$ sudo service mysqld stop
[sudo] password for aleksandr:
mysqld: unrecognized service
aleksandr@aleksandr-laptop:~$ /usr/bin/mysqld_safe --skip-grant-tables --user=root &
[1] 6073
aleksandr@aleksandr-laptop:~$ 131109 16:32:15 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
131109 16:32:15 mysqld_safe Logging to '/var/log/mysql/error.log'.
131109 16:32:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/bin/mysqld_safe: 126: /usr/bin/mysqld_safe: cannot create /var/log/mysql/error.log: Permission denied
/usr/bin/mysqld_safe: 1: eval: cannot create /var/log/mysql/error.log: Permission denied
131109 16:32:15 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
/usr/bin/mysqld_safe: 126: /usr/bin/mysqld_safe: cannot create /var/log/mysql/error.log: Permission denied

[1]+  Выход из 2       /usr/bin/mysqld_safe --skip-grant-tables --user=root
aleksandr@aleksandr-laptop:~$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
aleksandr@aleksandr-laptop:~$ UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root';
bash: ошибка синтаксиса около неожиданной лексемы `('
aleksandr@aleksandr-laptop:~$


  • Печать

Страницы: [1] 2  Все   Вверх

  • Ошибка php notice undefined offset 1
  • Ошибка page fault in nonpaged area win32k sys
  • Ошибка php network getaddresses
  • Ошибка packet tracer has stopped working unexpectedly
  • Ошибка php call to undefined function