How to fix this kind of error?

Warning: mysql_connect () [function.mysql-connect]: Access denied for user 'host1326126_panel' @ 'localhost' (using password: YES) in Z: \ home \ localhost \ www \ config.php on line 111

Warning: mysql_select_db () expects parameter 2 to be resource, given in Z: \ home \ localhost \ www \ config.php on line 112

Fatal error: Uncaught exception 'Exception' with message 'No database selected' in Z: \ home \ localhost \ www \ config.php: 131 Stack trace: # 0 Z: \ home \ localhost \ www \ config.php (149) : DB-> query ('SELECT * FROM ...') #1 Z:\home\localhost\www\lib\user.lib.php(179): DB->fetch_all('SELECT * FROM ...' ) # 2 Z: \ home \ localhost \ www \ lib \ user.lib.php (73): User-> Check_user (NULL, NULL, NULL, '11', NULL, NULL, NULL, NULL, '1') # 3 Z: \ home \ localhost \ www \ lib \ user.lib.php (21): User-> Insert_user () # 4 Z: \ home \ localhost \ www \ lib \ user.lib.php (200): User -> __ construct (Object (DB)) # 5 Z: \ home \ localhost \ www \ user.php (7): require_once ('Z: \ home \ host-ga ...') # 6 Z: \ home \ localhost \ www \ reg.php (2): require_once ('Z: \ home \ host-ga ...') # 7 {main} thrown in Z: \ home \ localhost \ www \ config.php on line 131

  • The Access denied for user ... string doesn’t tell you anything, is it? All the rest are the result of combining it and the programmer’s curvature, not checking for errors. - user6550

1 answer 1

Access denied for user 'host1326126_panel' @ 'localhost' (using password: YES) in Z: \ home \ localhost \ www \ config.php on line 111

Transfer:

Access denied for user 'host1326126_panel' @ 'localhost' (if password is used: yes) in the file Z: \ home \ localhost \ www \ config.php in line 111

In short, you use the wrong data to connect to the MySQL server.