No privileges on xampp server phpmyadmin - mysql

As you can see, there is no privileges tab, and I can't a create new database

Usually this is because you're not actually logged in as the user you think you are, but as the anonymous user instead. Double check your username and password, and make sure the host field is matching for the account you're trying to log in to. For example, if you're able to connect through the command line client which connects over sockets, your host is 'localhost' but if phpMyAdmin is using the TCP connection type, your host will be 127.0.0.1 instead; these aren't the same to the MySQL permissions system. If you changed the root password for root#localhost but not root#127.0.0.1 it won't match the new password in this case.

Related

How to create user that I can connect with?

MySQL newbie here,
I've installed MySQL on my Windows 10 machine and can connect using MySQL Workbench with the root username and everything works as promised.
However, now I want to create another user to connect with and give that user access to just one database on the server.
I've created the user with these commands:
CREATE USER 'user'#'localhost' IDENTIFIED BY 'f^rest_of_password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'user'#'localhost';
FLUSH PRIVILEGES;
I've created the database with this command:
CREATE DATABASE wordpress
SO, now I tried to create a connection in MySQL Workbench using that user and the password and it fails.
The error message says:
Cannot Connect to Database Server
Your connection attempt failed for user 'user' to the MySQL server at localhost:3306
Please:
1 Check that MySQL is running on address localhost
2 Check that MySQL is reachable on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the user user has rights to connect to loclahost from your address (MySQL rights define what clients can connect to the server and from which machines)
4 Make sure you are both providing a password if needed and using the correct password for loclahost connecting from the host address you're connecting from
What is my next move?
Thanks,
Owen
As soon as I post a question....
Turns out I needed to specify the "Installation Type" of custom,
the "Configuration File Section" of mysqld
and the "Windows Service Name" of MySQL80
(Ended up copying the working root connection and changing the username and password).

How does MySQL determine host of client when connecting remotely?

I'm trying to establish a connection to a MySQL server on a remote host. Both machines are running RH 7.5 and MySQL 5.7.
I can connect to the server as a root user. I did that, and used it to set up a secondary user like this:
CREATE USER 'foo'#'client-ip-address' identified by 'my-password';
and then
GRANT ALL PRIVILEGES ON my-db.* to 'foo'#'client-ip-addres';
That all went fine. But to my surprise, when I tried to connect using this new user, I got an error I wasn't used to:
$ mysql -u foo -h server-ip-address -pmy-password my-db
Access denied for user 'foo'#'some-hostname-not-an-ip.com' (using password: YES)
I know the IP address of the client (where I'm connecting from), which is why I set up the user with that value in the "host" column on the server. But the client is obviously trying to establish a connection using a value for "host" that is not the IP address. Instead it's some hostname, and not an IP address at all.
Where is this value coming from? How does mysql determine its own host when it tries to connect to a remote server? In the past I've only ever seen it use the machine's own IP address.

MySql password for service Mysql#server-ip:3306

I created a new user and when I try to connect to the db remotely via the new user I get this message and none of the passwords I use are correct. I can login to root no problem. I checked and port 3306 is open and everything since root works fine. I'm losing my mind over this.
message box
You can specify the host when creating a user on MySQL:
CREATE USER 'johndoe'#'localhost' IDENTIFIED BY 'somesupersecurepassword';
Replace localhost for your public IPv4.
For testing, you can replace localhost for %, which should allow all hosts.
CREATE USER 'johndoe'#'%' IDENTIFIED BY 'somesupersecurepassword';

MySQL server root user deleted, can't connect to server

Somehow I must have deleted the root user and now I am getting messsages that localhost cannot connect to the server so I pretty much can't do anything at the moment. I tried to reinstall the server but for some reason there is no root account created.
Is there some kind of hidden file on my computer that is disallowing connections from localhost despite me completely removing the server application?
Some have suggested using --skip-grant-tables and adding a root user but I just get a message that localhost can't connect to the server. It's madness, can't I just create another server instance with a root account or something?
You can create the root user using the method described in section C.5.4.1.1
http://dev.mysql.com/doc/refman/5.5/en/resetting-permissions.html
However, instead of an update of the password put the following SQL in the text file:
use mysql;
insert into user (Host, User, Password) values ('localhost','root','');
update user set Select_priv='Y',Insert_priv='Y',Update_priv='Y',Delete_priv='Y',Create_priv='Y',Drop_priv='Y',Reload_priv='Y',Shutdown_priv='Y',Process_priv='Y',File_priv='Y',Grant_priv='Y',References_priv='Y',Index_priv='Y',Alter_priv='Y',Show_db_priv='Y',Super_priv='Y',Create_tmp_table_priv='Y',Lock_tables_priv='Y',Execute_priv='Y',Repl_slave_priv='Y',Repl_client_priv='Y',Create_view_priv='Y',Show_view_priv='Y',Create_routine_priv='Y',Alter_routine_priv='Y',Create_user_priv='Y' where user='root';
flush privileges;

Remote MySQL host thinks I'm on a different host

I'm trying to connect to a remote host, dev, from my webserver. When I do this command from the webserve composer.domain.com: mysql -u username -ppassword -h dev.domain.com, I get an error after authenticating that says access denied for username#sports.domain.com.
sports.domain.com IS a valid vhost on the webserver, but it's one of 14, and it's not the primary host, nor the one the IP resolves to via DNS.
Any idea where I should look to figure out why MySQL thinks I'm coming from sports.domain.com instead of the expected composer.domain.com?
During creating the mysql user, it should be specified the host where the user is allowed to connect. By default it is localhost. Try to add other user account on the database server try the following:
CREATE USER 'username'#'%'
IDENTIFIED BY PASSWORD 'password';
OR
CREATE USER 'username'#'sports.domain.com'
IDENTIFIED BY PASSWORD 'password';
% - it means that all clients are allowed to connect using user account.