dbcon.php needs to know how to access your MySQL database. On my laptop, for example, I have apache, php and a mysql setup for localhost connections. My login name is, naturally, “example” and my password is “3x4mpl3_p4ssw0rd”. Someone told me once that it was smart to use letters and numbers, and I have been ever since. The top of dbcon.php therefore looks like:
To set up the database, go into MySQL and create the database:
CREATE DATABASE chat2_db;
To execute Setup.sql, navigate in the terminal to the directory with Setup.sql in, then execute the following:
mysql -u example -p chat_db < Setup.sql Remember that example is my username, not yours, and you might need to put something else in. You will be prompted for your password. Alternatively, I’m sure PHPMyAdmin will have a nice interface for all of this.