Making a Database Remote [closed] - mysql

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have downloaded MySQL Community Server and I need to make my database remote so that it runs on my professor's computer but I have no idea how to do that. Since I have zero experience with DBs on a PC, please don't hesitate to give me too many details.
Note: What I found on the internet so far didn't work for me. For example some suggest to write this
GRANT ALL PRIVILEGES ON *.* TO 'root'#'%' IDENTIFIED BY 'password';
on cmd but I'm getting ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'admin'' at line 1

The full installation instructions (including setting up the server, creating a user and starting the server for the first time can be found at https://dev.mysql.com/doc/refman/8.0/en/windows-installation.html
Looking at the new details on here, you're trying to do 2 things with 1 statement. If you really want to allow root access from everywhere (this comes with security implications, I'd normally recommend root use is restricted to localhost), you would use something like GRANT ALL PRIVILEGES ON *.* TO 'root'#'%'; and to change the password you'd use something like ALTER USER 'root'#'%' IDENTIFIED BY 'password';

Related

I am getting errors while fetching APIs from FE regarding MySQL database connection [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 days ago.
Improve this question
I ran following commands in MySql command line
grant all privileges on . to root#localhost;
flush privileges;
but it didn't work
How to grant all permissions to all users no need of thinking about security I just want to start this project immediately on my local machine
And in console onclick the signup button this error occuring(img 2)
I am tried several command to grant permission I don't succeed.

Centos mysql access remote [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I could before login with the username : username, and no password.
then it stopped working, created another account, so it worked for a while. Then it randomly stopped.
Now the users are ( from ssh)
i tired to login with the user root, omg, username ( host %), and also tried on root and testacc on the ip adresses. but nothing works. ( i am 100% sure i was using the right passwords)
I get this while trying to connect with one of the users:
Q: How can i make this work? why wont it work out of suddenly? and could someone tell me more about how this acually works?
You need to GRANT access from outside in mysql.
Go to mysql server and login as root user.
Run GRANT ALL ON db_name.* TO 'user'#'81.167.51.107' IDENTIFIED BY 'password' for access from particular IP address or GRANT ALL ON db_name.* TO 'user'#'%' IDENTIFIED BY 'password' for any IP address.

Mysql remote connection [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have two mysql db . One is 10.0.3.129, another is 10.0.3.139. I want to connect 10.0.3.129 from 10.0.3.139. Could someone tell me what should I do with 10.0.3.139 and 10.0.3.129 ? ? Thank you .
Make sure that MySQL port is open for connection from 10.0.3.139 to 10.0.3.129, verify using
telnet 10.0.3.129:<MySQL port> where you have configured your server.
Create a MySQL user in 10.0.3.139 like:
Create MySQL user in server by executing this query
CREATE USER 'test'#'10.0.3.139' IDENTIFIED BY 'test123';
and given proper permission to this user by using GRANT syntax.
Now try to connect using MySQL command line or any GUI tool from 10.0.3.139, it should work.

MySQL for admin and user(receptionist) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am doing a project on hotel management, How can i create a MySQL database (that will connect to java), where the admin has the sole right and the receptionist has privileges on some of the tables, like inserting, selecting...
This is possible, have a look at http://dev.mysql.com/doc/refman/5.5/en/privilege-system.html. However, I would highly recommend to handle these kind of permissions on application (java) level, so you don't have to switch mysql users inside your app.
Install MySQL.
mysqladmin -u root password "secret-password"
mysql -u root -p'secret_password'
> CREATE DATABASE hm ;
> GRANT SELECT,INSERT,UPDATE ON hm.* TO hm_receptionist#'%'
> IDENTIFIED BY 'secret_password' ;
> GRANT ALL ON hm.* TO hm_admin#'%'
> IDENTIFIED BY 'secret_password' ;

Why do I have a lot of root users in my Mysql? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I don't remember creating these users in my Mysql installation:
debian-sys-maint
phpmyadmin
And I have 3 Any users and 4 root users.
Here's the screen shot taken from Phpmyadmin:
http://imgur.com/AYwkxKn
And here's the command line version:
http://imgur.com/PWaccsV
Should I be wary of these users? Or is this the default?
A MySQL user is actually identified by a pair of username and hostname. 127.0.0.1, ::1, and localhost all allow you access from your local machine. Without them, you would not be able to connect. The only one that may be an issue is the ip-10.242.75.6, but I expect that is the machine's IP also?
As for the phpmyadmin and ANY users, the MySQL documentation says
The USAGE privilege specifier stands for “no privileges.” It is used
at the global level with GRANT to modify account attributes such as
resource limits or SSL characteristics without affecting existing
account privileges.
You would have a record for each user and each IP address that user is allowed to connect from.
These are permissions rather than separate user accounts. All it says is that, user root is allowed to connect from all those host addresses with ALL_PRIVILEGES. localhost, ::1 and 127.0.0.1 are the same machines address on which the SQL server is installed on.
The listed hosts on the picture are different name variations of localhost. these 2 users should be able to access localhost by any of these names, that's why there are created duplicates