Databases, XAMPP, and hosting

Sorry if this might be the wrong category for this post but I just have a few newbie questions. Im familiar with coding up a site and uploading the project files to my FTP host but I have never built a database and hosted one before. I have a project now that requires a database and have installed XAMPP and have poked around the myphpadmin control panel. I was wondering if someone could give me any advice for things I should know right off the bat for configuring a database, as to avoid security problems and other issues for my site. (i.e. collation settings, etc.)

For hosting, I know my host has a MySQL admin panel, but XAMPP uses MariaDB Im pretty sure. Will this matter? Are there any other conflicts with putting my XAMPP project on my hosted web server, or other general issues about hosting a project with a database, that I should know about? My domain registration renewal is coming up and I wouldn’t renew with my current provider if I needed to switch (using NearlyFreeSpeech rn).

I understand that hosting and databases are very broad and extensive topics, so I wouldnt expect someone to have the time to write a whole book for me about it. Just looking for some tips to avoid newbie headaches and how I would go about bringing an XAMPP project live. On the XAMPP site they have a lot of information about integrating with various cloud services (Amazon cloud, Google Cloud Service etc.) but not for a regular web host.

2 Likes

I develop my sites on my local machine using XAMPP and MySQL for the database and don’t have issues uploading to a live server. I’ve never used MariaDB with XAMPP.

1 Like

XAMPP has recently switched over to MariaDB from MySQL due to licensing issues raised after its acquisition by Oracle. MariaDB is nothing but a fork of MySQL, so you won’t be facing problems with exporting and importing data. I have not tried the new version of XAMPP yet as MariaDB is still being worked on.

I would recommend you to download older version (5.6.3) of XAMPP with MySQL. You can download old versions here https://sourceforge.net/projects/xampp/files/

You wont be facing any issues uploading your project to the host (hope you are using a Linux server & programming with PHP) . Regarding database, you need to create a new database with username and password in the cpanel after which it is just a matter of importing the data locally and exporting it to the database in the server.

2 Likes

So I need some help getting off the ground. I’v installed the latest version of XAMPP but I cant even effectively set the root user password without somehow locking myself out of the account. Could you guys just tell me how to set the one admin user with a password? Theres a few default users already there with the name ‘root’ so idk if I can delete them or what. Same with tables, do I need all these?

Heres a screen cap of my cPanel:

I don’t know if this is the best way, but I’m sure the experts will correct me if not: I just added a new user, gave it a username and password, and granted it all privileges.

Because it’s just for my local development, I use that user for all my project databases.

Here is the procedure for creating a new database in cPanel.

  1. Go to MySQL databases in the database section.
  2. In the form that appears. Key in your desired database name and click create database.
  3. Under Add new user create a new user with desired username and pwd.
  4. Under Add user to database choose the username in user dropdown and choose the database in the database dropdown and click add.
  5. Now go back to cPanel Home->Databases->phpMyAdmin. You will be able to see your new database in the left panel, click on it. Go to import section and import the local .sql file.

Okay thanks for the help guys. I successfully added a table to the DB and all of that is working. I also successfully added a password to the root user with host “localhost”. Do I need all those extra users in that screen shot? Theres 3 root users with different host attributes (127.0.0.1, localhost, and ::1) and those I seem to understand from here: https://dev.mysql.com/doc/refman/5.5/en/default-privileges.html.

The top three in that screen shot though I have no idea about, that have “Any” and pme as usernames and have hosts as % and localhost… Can I delete them, what are they for?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.