Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

username/password problems

Featured Replies

I am trying to access MySQL using PHP. I get an error message stating access is denied for user '-uroot'@'localhost'. The '-uroot' and '-proot' worked fine in the MySQL console. Are they different if I'm accessing MySQL using PHP?

 

Here's the part of the code where I put in username and password:

 

<?php
/* Program: mysql_up.php
* Desc:	Connects to MySQL Server and 
*		  outputs settings.
*/
echo "<html>
   <head><title>Test MySQL</title></head>
   <body>";
$host="localhost";
$user="-uroot";
$password="-proot";

$cxn = mysqli_connect($host,$user,$password);
$sql="SHOW STATUS";
$result = mysqli_query($cxn,$sql);
if($result == false)

 

 

Thanks in advance.

Yes they are different should be something like this:

 

// Database configuration file config_db.php

$dbhost = 'localhost'; //server name localhost or 127.0.0.1

$dbuser = 'root'; //User name default root

$dbpass = 'fred123s'; //Password default root -- I will be using ''fred123''

?>

 

For more info check out:

 

http://wiki.uniformserver.com/index.php/Ne...rs:_Quick_MySQL

 

All the best

Ric :)

  • Author

Yes they are different should be something like this:

 

<? // Database configuration file config_db.php

$dbhost = 'localhost'; //server name localhost or 127.0.0.1

$dbuser = 'root'; //User name default root

$dbpass = 'fred123s'; //Password default root -- I will be using ''fred123''

?>

 

For more info check out:

 

http://wiki.uniformserver.com/index.php/Ne...rs:_Quick_MySQL

 

All the best

Ric :)

Thanks. I followed the link and realized I needed to set a password. So I followed the link to change the password and managed to follow the instructions for changing the MySQL root password. However, the stop.bat file I have doesn't stop the server. I had to restart the computer. Also, your last instruction "Restart the servers and check access using phpMyAdmin (left menu in apanel)" needs a few more words of explanation because once I get to phpMyAdmin, I don't see anything that tells me where to put the new password.

 

Nevertheless, I retried the script and it worked. Thanks again. :)

Thanks for the feedback; I have added a few more works to the section you mentioned. :)

 

You stated, “the stop.bat file I have doesn't stop the server.” this is a known bug and easily fixed follow the instructions on the following page:

 

http://wiki.uniformserver.com/index.php/Bu...ollo:_Close_bat

 

All the best

Ric :)

  • 2 weeks later...
  • Author

Thanks for the feedback; I have added a few more works to the section you mentioned. :)

 

You stated, “the stop.bat file I have doesn't stop the server.” this is a known bug and easily fixed follow the instructions on the following page:

 

http://wiki.uniformserver.com/index.php/Bu...ollo:_Close_bat

 

All the best

Ric :)

 

This is a link to the close.bat file. I did a search for stop.bat bug fix but couldn't find a file to download.

This is a link to the close.bat file. I did a search for stop.bat bug fix but couldn't find a file to download.

 

There is no problem with stop.bat; when run it indirectly runs Close.bat this is where the problem is.

 

The file to download is Close.bat.txt when you click this link it will open a text page in your browser. Save the page as Close.bat and place in folder *\Uniform Server\udrive\home\admin\program

 

Note: Batch files are very powerful and potentially harmful because of this certain security software won’t let you down load them hence the .txt extension

 

All the best

Ric :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.