Changes

Jump to navigation Jump to search

MySQL separate user accounts

107 bytes added, 19:05, 14 July 2011
Punctuation and grammatical changes; some clarification and reorganization.
{{Uc nav mysql}}
'''===Hosting separate user accounts on MySQL server'''===
Hosting separate user accounts on your MySQL server requires a properly configured MySQL user management system and the use of phpMyAdmin-advanced authentication.
Sounds While it sounds like a complex task however , in reality it is extremely easy because inherently all the components are inherently in place. The Uniform Server has phpMyAdmin set-up initally for local access by user root this . This is easily changed to provide a central copy for users to access via the Internet and maintain their individual databases.
Before diving in , it is worth looking at a little MySQL history this . This helps in understanding why The Uniform Server changed the program executable name!.
== MySQL 3.23/4.0/4.1 Programs - History ==
I have included this section to show that there were actually several versions of the MySQL server to choose from:
* '''mysqld.exe''' This is the basic version of MySQL if you run Windows 95, 98, or ME. It includes support for all advanced features, and includes debug code to provide additional information in the case of a system crash.
* '''mysqld-nt.exe''' This version of the server is compiled and optimized like mysqld-opt, but is designed to run under Windows NT/2000/XP as a service. If you're using any of those operating systems, this is probably the server for you.
* '''mysqld-max.exe''' This version is like mysqld-opt, but contains advanced features that support transactions.
* '''mysqld-max-nt.exe''' This version's is similar to mysqld-nt, but has advanced features that support transactions.
After installing full versions of MySQL , all the above programs are located in the bin directory. Use mysql-opt for Win98x/ME and mysqld-nt on Windows NT/2000/XP. Actually, don't use these versions any more, except to do archival or laboratory studies.
== MySQL 5.*.** Programs ==
When MySQL five series was introduce introduced, support for Windows 95/98/ME and older version versions were dropped. The following versions are supported : Windows operating system 2000; , XP, Windows Server 2003, Vista and Windows Server 2003 the 7. The number of programs were reduced accordingly:
* '''mysqld.exe''' This is the basic version of MySQL It includes support for all advanced features and is optimized for speed.
* '''mysqld-debug.exe''' This is similar to the basic version of MySQL and includes debug code to provide additional information.
* '''mysqld-nt.exe''' This version of the server is compiled and optimized like mysqld, but is designed to run as a service.
'''''Uniform Server 3.5-Apollo'''''
Take a If you look in folder *\Uniform Server\udrive\usr\local\mysql\bin you may be surprised to find the server is named '''mysqld-opt.exe'''! In reality it is '''mysqld-nt.exe''' . It was renamed allowing to allow backwards compatibility with older plugins and scripts.
Real significance The essential point is if you want to upgrade the MySQL server yourself make , be sure to use the correct file and rename it accordingly.
Enough of this digression lets look at Now let's return to providing our users with control and access to their MySQL accounts using phpMyAdmin.
== MySQL user management system ==
MySQL management is straightforward every . Every user , with the exception of root (super user) have their , has global select privileges disabled.Each user must have a name and a corresponding password.To complete the set-up , assign each user one or more databases to access and assign the appropriate privileges.
That covers the management system, to . To set-up each user account you can use either [[MySQL Console | MySQL console]] or [[MySQL phpMyAdmin | phpMyAdmin]] click . Click the appropriate link for details. Below I have provided is a summary for using phpMyAdmin after . After this show you we'll see how to install a central copy of phpMyAdmin for your users to access on-line.
== Summary of steps required using phpMyAdmin ==
<ol start="4">
<li> Enter new database name into '''Create new database''' field and click on '''Create'''
<li> '''Click on Home''' which takes you back to the home page.
<li> Repeat steps 4 and 5 for each new database that requires creating
</ol>
<li> Click on the '''drop down''' list and '''select a database''' to assign to the user.<br>
(Alternatively enter the database name and click on go)<br>
In either case opens the user edit privileges page opens for that database
</ol>
"phpMyAdmin gets the users' privileges directly from MySQL's privilege tables. The content of these tables may differ from the privileges the server uses, if they have been changed manually. In this case, you should '''reload the privileges''' before you continue."
Click on reload the privileges link contained in the above statement this . This executes the query
SQL query:<br>FLUSH PRIVILEGES ;
Instructing instructing the MySQL server to take another look at the user tables and hence puts all of your new users and privileges into operation.
=== PhpMyAdmin authentication ===
Authentication has been built into phpMyAdmin since version 2.0.3 and uses the following procedure:
This allows users to log into phpMyAdmin and modify their own databases.
== Set-up a central copy of phpMyAdmin ==For security reasons, The Uniform Server for security reason hides phpMyAdmin from external users, ; access is limited to local hostlocalhost. Using a copy of this with minor changes allows users to administer their own databases over the Internet. A central copy of phpMyAdmin is placed in the root folder with authentication enabled as follows:
# The folder '''phpMyAdmin''' is located in:
## (3.3) diskw\home\admin\www
## (3.5-Apollo) '''udrive\home\admin\www'''
# Copy this folder and all its contentents contents to the root folder:
## (3.3) diskw\www
## (3.5) '''udrive\www'''
You will be challenged to enter name and password.
Enter user root and the password you set for the MySQL server (using apanel) you . You will now have access to phpMyAdmin.
Note: Each user must have a different name and password.
== Dead in the water = Severe Security Situation ===
<div style="border:1px solid red; padding-left:4px; background: #ffcccc">
You are '''dead in the waterSTANDING OUTSIDE NAKED''' if you can access the put your servers online leaving '''MySQL account root with password root''' put your servers online and kiss ! Kiss your MySQL server good byegoodbye. It will be hacked and attacked.
</div>
You are the only one that should know your root password remember ! Remember, the server defaults to root hence every one so everyone knows this. Please check out the security checklist page (apanel) and change the root password according to the instructions found on this that page.
=== File .htaccess ===One final touch is to copy the file .htaccess (the one contained in your root folder will do) into the folder phpMyAdmin and edit it its contents:
Delete all the lines and add this:
'''IndexIgnore *'''
It This prevents viewing of any folders by a browser any folders in phpMyAdmin that do not contain an index page.
=== Final test ===
With your servers online, type into to your browser '''<nowiki>http://your_domain/phpmyadmin/</nowiki>''' and check that everything works.
== Conclusion ==
Well that about wraps it up for user accounts on a MySQL server -- easy to implement. If Even if you are not going to host user accounts, it is still worth reading the [[MySQL phpMyAdmin | phpMyAdmin]] page to get a feel for its power. Remember , you can break cobble The Uniform Server to your hearts content when . When it becomes irretrievable irretrievably broken, just delete it and install a clean version.
'''''[[#top | Top]]'''''
----
{|
|}
 
[[Category: UniCenter]]
[[Category: MySQL]]
[[Category: Facts]]

Navigation menu