Launch Directory Utility (it is in /System/Library/CoreServices/Applications/) Click the lock in the main window. Enter an administrator's name and password, then click the OK button. Go to the Edit menu, Choose "Enable Root User". Enter the root password you wish to use in both the Password and Verify fields, then click OK.
How to log in as root... If you are logged in, go to Apple menu, choose "Log Out". If logging in from a list of usernames with pictures, click Other. In the name field, type: root In the password field, type the password you defined when you set up the account.
How to disable the root user... Open Directory Utility (see above) Click the lock in the main window. Enter an administrator name and password, then click OK. From the Edit menu, choose "Disable Root User".
Warning: mysqli_connect(): MySQL server has gone away in /Library/WebServer/Documents/Owen2/Inc/Log.inc.php on line 8
Warning: mysqli_connect(): Error while reading greeting packet. PID=51150 in /Library/WebServer/Documents/Owen2/Inc/Log.inc.php on line 8
Warning: mysqli_connect(): (HY000/2006): MySQL server has gone away in /Library/WebServer/Documents/Owen2/Inc/Log.inc.php on line 8
Could not connect to MySQL: MySQL server has gone away