Water
Water

Reputation: 1

Can't find a way to connect mysql to phpmyadmin's database

I've used mysql -u root

and then

create database 'whatevername'

it results in

Query OK, 1 row affected (0.002 sec)

but nothing changes, no database added to the phpmyadmin

solutions will very much be appreciated

Upvotes: 0

Views: 92

Answers (2)

geoidesic
geoidesic

Reputation: 5063

Remove phpmyadmin from the equation. Just use the command line. Once you've created the database. Do:

show databases;

If your database appears in the list then it's been created. In which case you're probably connecting to the wrong database in PhpMyAdmin.

Upvotes: 1

user14018128
user14018128

Reputation:

if use root, try Create a new database user:

GRANT ALL PRIVILEGES ON *.* TO 'db_user'@'localhost' IDENTIFIED BY 'P@s$w0rd123!';

Log out of MySQL and Log in as the new database user you just created.

mysql -u db_user -p

Create a new database

CREATE DATABASE db_name;

modify db_name with the actual name you would like to give the database

Upvotes: 0

Related Questions