:Create a New mySQL User

From ASUW Wiki
Revision as of 15:35, 6 June 2007 by Asuwtech (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In order to Create a New mySQL User you first need to log into phpMyAdmin with your UWNetID as an administrator, most likely asuwtech.

  1. Click Privileges
  2. On the bottom click Add a new User
  3. For User name enter the username you are adding. In general should be equivalent to the host portion of host.asuw.org.
  4. For Host use the select menu to select Local
  5. Bypass the Password field and click the Generate button next to Generate Password.
    • This will create a random password. Since mySQL passwords don't generally need to be remembered and are instead input into a configuration file and forgotten, make sure to generate a truely random password for security.
  6. Click the Copy button next to Generate Password which will copy the generated password into the Password and Re-type fields.
  7. Select, copy, and paste the generated password into your configuration file.
    • All documents that contain mySQL passwords should chmod 0600 so that they are not readable by everyone on the server.
  8. Under Database for user select Grand all privileges on wildcard name which allows the user to create and administer any database that begins with their username and then an underscore character.
  9. Make sure all the boxes under Global privileges are unchecked and then scroll to the bottom and click Go
  10. Select the database named phpmyadmin_pass and then select the table current.
  11. Select the Insert button at the top and then fill in the username and password that you just generated.
    • This will allow anyone specified in the database created in the next step to log in as this user.
  12. Make sure you are going to Insert as a new row and then Go back to previous page then click Go.
  13. Make a new database with the following code replacing -username- with your new username and -uwnetid- with the UWNetID of the individual you want to grant access to with these databases. If you don't want to grant access to anyone just exclude everything below Dumping data for table `access`
-- Database: `-username-_phpmyadmin`
CREATE DATABASE `-username-_phpmyadmin` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `-username-_phpmyadmin`;

-- --------------------------------------------------------

-- Table structure for table `access`

CREATE TABLE `access` (
  `granted` varchar(20) NOT NULL default '',
  KEY `granted` (`granted`)

-- Dumping data for table `access`

INSERT INTO `access` VALUES ('-uwnetid-');
Personal tools