skip to Main Content

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

2

Answers


  1. 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

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search