Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MariaDB [(none)]> SELECT User,Host FROM mysql.user;
- +--------+-----------+
- | User | Host |
- +--------+-----------+
- | dba | % |
- | fcapdi | % |
- | root | 127.0.0.1 |
- | root | ::1 |
- | | localhost |
- | root | localhost |
- | | tester |
- | root | tester |
- +--------+-----------+
- GRANT ALL ON
- your_database_schema_name.* to
- 'fcapdi'@'192.168.0.18' IDENTIFIED BY 'your_connection_password';
- As an aside question under comments
- SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newPass123^');
- SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('newPass123^');
- SET PASSWORD FOR 'root'@'etc_etc' = PASSWORD('newPass123^');
- you can also do it in a single update statement but it depends on your mysql version
- create user 'joe1'@'localhost' identified by 'blah';
- create user 'joe1'@'127.0.0.1' identified by 'afadfafsdblah2';
- create user 'joe1'@'%' identified by 'djdjdjjdjdd';;
- select user,host,password from mysql.user where user='joe1';
- +------+-----------+-------------------------------------------+
- | user | host | password |
- +------+-----------+-------------------------------------------+
- | joe1 | localhost | *0380BEA27363E56C37F0BFDA438F429080848051 |
- | joe1 | % | *7BEAF25E9BDFBDEF5A9B9E4A37023721B668FA51 |
- | joe1 | 127.0.0.1 | *5CD978E569B31B1558E5C1D0972E6E02516893BF |
- +------+-----------+-------------------------------------------+
- update mysql.user set password=PASSWORD('nEW_COMMon_password762') where user='joe1';
- -- 3 rows updated
- select user,host,password from mysql.user where user='joe1';
- +------+-----------+-------------------------------------------+
- | user | host | password |
- +------+-----------+-------------------------------------------+
- | joe1 | localhost | *A248B352CE5BF750A11AA9BA253B5F191C721D1A |
- | joe1 | % | *A248B352CE5BF750A11AA9BA253B5F191C721D1A |
- | joe1 | 127.0.0.1 | *A248B352CE5BF750A11AA9BA253B5F191C721D1A |
- +------+-----------+-------------------------------------------+
- drop user 'joe1'@'%';
- drop user 'joe1'@'127.0.0.1';
- drop user 'joe1'@'localhost';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement