+ 4

How to enable access for user 'root'@'localhost' and What's the meaning of Stack trace: #0? How to solve it?

Error opening localhost:8080 after importing the databases. The databases: Result in phpmyadmin after impoting : https://ibb.co/bO3RiU Image Screenshot: https://ibb.co/c9nxq9 How to enable access for user 'root'@'localhost'? What's the meaning of Stack trace: #0? How to solve this problem? Additional Information: I'm using: 1. Google App Engine https://ibb.co/bS8vA9 2. dev_appserver.py https://ibb.co/fobhq9 3. Screenshot image of app\database.inc https://ibb.co/bLsYxp 4. Screenshot image of xampp\phpMyAdmin\config.inc.php https://ibb.co/hNe2q9 This question related to https://www.sololearn.com/Discuss/1470198/why-i-can-not-import-an-sql-file-and-how-to-solve-it-should-i-create-a-certain-new-database-first

25th Aug 2018, 6:14 AM
Adi Pratama
Adi Pratama - avatar
3 Answers
+ 3
Your database user has failed to connect to the database. Make sure you set the correct host, db name, user and password. And make sure db user has all privilege to the database.
25th Aug 2018, 6:29 AM
CalviŐ˛
CalviŐ˛ - avatar
+ 1
Adi Pratama-Universitas Brawijaya, I hope this will fix your error. 👍 if not, start with debugging every line. $servername = "localhost"; $username = "username"; $password = "password"; $databassname = "dbname"; $conn = new mysqli($servername, $username, $password, $databasename); or try this $db = mysqli_connect('localhost','username','password','databasename'); 1. mysqli_connect 2. mysqli_query 3. mysqli_fetch_array 4. mysqli_close 1. make the connection and select the database 2. perform the query on the table 3. print out the data 4. close the connection
25th Aug 2018, 8:37 AM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
+ 1
$db = mysql_connect('localhost','root','','dbname');
26th Aug 2018, 2:31 AM
Xuro
Xuro - avatar