mamp - MySQL root user has no privelages -


i clicking around phpmyadmin, , accidentally removed privileges root user facepalm

so now, when in phpmyadmin, have no privileges @ all. how can reset privileges root user?

(mysql installed through mamp)

it depends on operating system running, need kill mysql service , relaunch skipping grant tables.

on osx mamp

  • shutdown mamp together, ensure mysql not running
  • then enter following command start mysql right permissions

/applications/mamp/library/libexec/mysqld --skip-grant-tables --port=8889 --socket=/applications/mamp/tmp/mysql/mysql.sock

  • then launch mysql command line utility update priviledges

mysql -u root

in *nix:

mysqld --skip-grant-tables 

then run mysql command prompt

mysql -u root 

once in mysql command line

once running in skip grant tables mode, can run command update user privileges.

update mysql.user set grant_priv='y', super_priv='y' user='root'; flush privileges; 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -