I have been tasked with migrating a VPS previously build on a very shady centos 5 system (no hosting environment) into a perfectly working centos 7/cpanel environment. The old server setup had 29 websites using the root MySQL user/password in order to get his connections to work. I imported the databases and matched the root password but this is really not an ideal setup because the databases are not linked to the cpanel user and well using the root password in production is very bad...
So my question is, now that the databases are on the server (can only be seen from the root phpmyadmin) how can I link them to a cpanel account?
From the root PHPMyAdmin in WHM, there was no "user" tab which is odd. I guess cpanel made sure all the databases were created from its cpanel system. But how can I link all the databases if I can't access that page? If the only way is by SSH, is there a way to do them all in batch?
There is no automated way to do this as far as I know.
The best option (unfortunatelly it involves some work and non automated actions) is to login to each of the accounts cPanel account (you can do that from WHM by clicking on the cPanel account which is displayed next to the cPanel account when you use List Accounts) and then use the SQL section to create a new database, a new user for that database, provided grants to that user.
Then you can use the Database Map Tool available in WHM to grant access to that database to a specific cPanel user, map rights and so on. You have to repeat this for each of your cPanel accounts. Last but not least, you'll have to modify the configuration files for each of your websites to reflect the new mysql settings (db name, user, password etc).
I know this is a slow and step by step method but it would be the best and safest especially that 29 accounts are not that much.
Related
This isn't a coding question, it's a problem I'm having. The thing is that on phpmyadmin (xampp) I have a user account with password, when I go to hostinger phpmyadmin database I try logging in with that account (typing username and password correctly) and it gives an error: The MySQL server did not authorize your access. Please help
XAMPP is usually used for local development and hostinger presumably is a hosted account. The two databases have no way of knowing about the other one or synchronizing changes, including any user accounts. Since your XAMPP username and password aren't associated with the hostinger account, you'll need to use the credentials given to you by hostinger for that connection instead.
NOTICE I'm not trying to steal anyone's database
My company works with firebird databases and there's this client who already has a system in their company, but they are interested in changing to ours, only if we can export their data from the old system, the problem is that they can't ask for the mysql password and I can't change the root password otherwise their system will stop working.
I have access to the folders and I already copied all the mysql folder to my computer
I have the same version of the client
my question is whether the password-protected server and database can be protected from copying so that my malicious customers to bypass security settings.
MySQL server has:
user -> 'root' with password with disable global privilege
user -> 'javaAPP' with password with limited privilege only for working database and disable disable global privilege
user -> 'superadmin' with global privilege
When try comand mysqdump requires password and allows action only for user 'superadmin'.
When copy folder '\data' with exist working database folder and every files to other computer all user settings permissions and passwords are transferred to the new server. So it's look ok.
When copy only database folder '\data\javaAPPdatabase' to other computer ... i see the tables empty .. no fields. I guess this is due to missing user rules.
So ... more what I need to do to protect unauthorized access to the database ?
I am trying to protect my java application through the database
Please help me!?
MySQL server is located in client network on client PC.
I recognize my knowledge in mysql is reduced to working functions, triggers and procedures.
MySQL server is located in client network on client PC.
Then it's theirs. They have complete access to it. There's no way to prevent them from reading all the data anytime they want.
Even if you restrict access with passwords, they can restart the MySQL service with the skip-grant-tables option enabled, so passwords are not enforced (see https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html).
The only way you can limit access to the data is NOT to install the database at the client site. Host the data yourself, and provide an API to access it through a web service you host.
Currently I have phpMyAdmin and MySQL installed on my server. I now want to provide access to phpMyAdmin to a friend of mine so he can setup his own databases and users, however I don't want him to be able to see or modify my databases.
Is this possible to do with a simple privilege account or do I require some kind of MySQL virtualization? I know cPanel installations provide this feature for web hosts, but I don't need or can afford cPanel at the moment.
You should look into MySQL Security Here specifically section 13.7.1.3 Grant statement. You could secure your DB from your friend logging in which will prevent him from seeing anything in that DB on PHPMyAdmin. Or you could create a DB for him to use and allow him access to that DB only.
You never mentioned if he will be on Localhost or will you need to open up MySQL for remote logins from other than Localhost which is the default behavior..
We have a joomla site up and running using a user called 'product_joomla' and a database with the same name.
I am able to connect to the mysql server using the that user above and password.
But I can only see the 'information_schema' database. the user does not seem to have access to the joomla database.
But that does not seem to be the case because the joomla site is using the same user and is working.
I am total noob with respect to mysql and joomla.
I am accessing the mysql database remotely via mysql-workbench.
I cannot figure out why that user cannot see the joomla database via workbench.
Even though we changed the user to accept connections from anywhere (not just localhost) that never updated the actual permissions on the joomla database – users still only granted admin rights if that user logged in from localhost.
So, the website was working via localhost but I was not able to connect remotely.