mysql create user if not exists

In 5.7.6 and above, you should be able to use CREATE USER CREATE USER IF NOT EXISTS ‘user’@’localhost’ IDENTIFIED BY ‘password’; Note that the 5.7.6 method doesn’t actually grant any permissions. If you aren’t using a version which has this capability (something below 5.7.6), you can do the following: GRANT ALL ON `database`.* TO ‘user’@’localhost’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)