I'm installing MySQL on ubuntu and I changed the data directory. I created new data files using
So now I need to access my database using
root but it won't let me in. I tried starting the database by skipping the grant tables:
mysqld --skip-grant-tables --skip-networking &
Now I'm in, but the mysql.user table doesn't have a single row, which is logical after creating the data files from scratch, or isn't it ??
So I tried:
CREATE USER 'root'@'localhost' IDENTIFIED BY 'mypass';
But it won't run because I'm running with
- So how can I create a
rootuser from that point ?
- And how can I stop the started mysql instance I just started with
--skip-grant-tablesbecause it seems I always have to
killall mysqldto do it !