Mistake:

mysql_connect () [function.mysql-connect]: Access denied for user 'root' @ 'localhost' (using password: YES) on line 30

With the code:

$connect = mysql_connect("localhost","root","12345"); mysql_select_db("movie_site", connect); $result = mysql_query("SELECT date, title, movies, images FROM movies", connect); $myrow = mysql_fetch_array($result); 
  • Do you need to translate? - user6550 pm
  • I understand. But why? See in config file: / * User used to store with storage * / $ cfg ['Servers'] [$ i] ['controlhost'] = 'localhost'; $ cfg ['Servers'] [$ i] ['controluser'] = 'root'; $ cfg ['Servers'] [$ i] ['controlpass'] = '12345'; So what's the problem? - navi1893
  • What does the config? Run the console "mysql -u root --password = 12345" and find out. - user6550
  • By the way, this is me in denver. Wrote to the console, nothing in return. Writes: is not a command - navi1893
  • So, look for where mysql is installed, somewhere there is a mysql.exe file. - user6550

1 answer 1

In Denver, a database without a default password. I mean that you did not touch anything and set a password for the user root , since you ask this kind of question. Then just write in your files.

 $cfg['Servers'][$i]['controlpass'] = ''; $connect = mysql_connect("localhost","root",""); 

Come for a specific answer to a specific question - it will solve your problem. I will not go into the details of MySQL settings here.