View Single Post
Old 09-15-2017, 05:49 PM  
Barry-xlovecam
It's 42
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
If the domains are on the same server they can use the same database logins as localhost.
Alternatively, each domain could be a separate database user (sharing the same database).

Each database has users with grant privileges given (configured) by the database root.
root@localhost
Code:
mysql -u root -p
Enter password:*******

CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
ON `databasesprefix%`.* TO user@localhost IDENTIFIED BY 'password';

FLUSH PRIVILEGES;
A database user (MySQL) can have a difference user name and password than the UNIX (webroot user) -- they probably should.

You can allow database remote connections restricted only to authorized static IPs also.
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote