Welcome Guest, Not a member yet? Register   Sign In
Database Error while connecting from Localhost
#11

What may be happening with the DB not showing in phpMyAdmin running under MAMP is that you have a manually installed mysql and a different version installed automatically by MAMP?

That MAMP welcome page also had some MySQL default details listed. Try using those in your CI config file, i.e.

Host: localhost
U: root
P: root

Also import your SQL file using phpMyAdmin, so the DB is installed on the same version/location of MySQL which MAMP uses when looking for it.
Reply
#12

So I figured this out, thanks very much for all of your help! You were right, I had installed the database via terminal and it uploaded to a different location. That's why it was not showing up in MAMP > PHPMyAdmin. I had followed a Codeigniter tutorial which imported the DB from the terminal - then ran the internal PHP sever from the terminal php -S localhost:8080. This is what was causing the database error - there was NO DATABASE! MAMP couldn't see the DB that was uploaded to the terminal location.

Also, when I tried to upload the DB into phpmyadmin it was too large, so I had to download it in two separate files from my server. Compressing both files into a zip file before uploading helped also.

It's running locally now on MAMP. Thanks again!
Reply
#13

Glad to hear you got it sorted, and thanks for posting your solution in case others have the same problem Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB