MyBB Community Forums

Full Version: How do I create Database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am self hosting and I have all of the pre-required on my Debian 7 install

I get the error

There seems to be one or more errors with the database configuration information that you supplied:
Could not connect to the database server at 'localhost' with the supplied username and password. Are you sure the hostname and user details are correct?
Once the above are corrected, continue with the installation.

This is all i did on this install of debian
sudo apt-get install apache2 php5 libapache2-mod-php5 php5-cli php5-gd -y
sudo apt-get install mysql-server mysql-client php5-mysql -y
sudo apt-get install phpmyadmin phpsysinfo htop iftop nmap linuxlogo -y

sudo usermod -a -G www-data <username>
sudo useradd -g <username> www-data
sudo chown -R :www-data /var/www
sudo chmod -R g+rwX /var/www
sudo chmod g+s /var/www

sudo gedit /etc/apache2/port.conf(change to port 8080)
(copy my site and latest mybb)

I tryed to add some data baeses in mysql but i guess im not doing something right. can anyone give any assistance?
Create a mysql user for mybb and an attached database. You can do that with phpmyadmin, using your mysql' root account.
How so, I have tried to do this though it has not worked.
Here is the MySQL way (using console):

Connect as root:
> mysql -h 127.0.0.1 -u root -p
If it responds that it has an error with the server (can't connect), try replacing 127.0.0.1 with localhost. If it failed again, check your mysql server, it may not be launched.
If it succeed, it will ask you for the root password, you may have setted it when installing mysql-server.

Creating database
Now, you are in MySQL console, you must create the database, I call it "mybb" :
CREATE DATABASE IF NOT EXISTS `mybb`;

Creating user
You must have a specific user for mybb, we'll call him "mybbuser" and his password will be "bbpass". He will access the database only from localhost.
CREATE USER 'mybbuser'@'localhost' IDENTIFIED BY 'bbpass';
GRANT USAGE ON * . * TO 'mybbuser'@'localhost' IDENTIFIED BY 'bbpass' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

Giving rights on the database
Now, mybbuser must be authorized to do anything on the mybb database:
GRANT ALL PRIVILEGES ON `mybb` . * TO 'mybbuser'@'localhost';

All is done, you can exit mysql and start the installation, using the good values.