MySQL query fails to run, but no error displayed

When i enter this SQL snippet into phpMyadmin nothing happens, and no error message is returned.

What can I do to fix it?

CREATE DATABASE `moodle` 
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE USER ‘moodle-owner’@’localhost’; 
CREATE USER ‘moodle-owner’@’127.0.0.1’;
CREATE USER ‘moodle-owner’@’::1′;

SET PASSWORD FOR ‘moodle-owner’@’localhost’ = PASSWORD(‘moodle123$%’);
SET PASSWORD FOR ‘moodle-owner’@’127.0.0.1’ = PASSWORD(‘moodle123$%’);
SET PASSWORD FOR ‘moodle-owner’@’::1′ = PASSWORD(‘moodle123$%’);

1 answer

  • answered 2018-01-14 11:36 grizzthedj

    I'm not sure what version of MySQL you are running, but in 5.7, the SET PASSWORD is deprecated. Try setting the user passwords with IDENTIFIED BY in the same query as CREATE USER.

    CREATE USER 'moodle-owner'@'localhost' IDENTIFIED BY 'moodle123%'; 
    CREATE USER 'moodle-owner'@'127.0.0.1' IDENTIFIED BY 'moodle123%';
    CREATE USER 'moodle-owner'@'::1' IDENTIFIED BY 'moodle123%';