installing XAMMP and WordPress on different ports
-
Hello All,
first, I recognize this has been posted a number of times before. I would say that I’ve read all the posts in advance of posting this and I still can’t figure it out. I’m open to the idea that I’ve missed something; so I’d very much appreciate any comments offered.
I’m trying to install XAMMP and WordPress on my laptop.
I’m wanting to run with port 81 for XAMMP and 3307 for MySQL.
I’ve made the below modifications based on forums posts discussing this topic to reflect the above mentioned port designations.
(a) in file – C:\xampp\apache\conf\httpd.conf
Listen 81
ServerName localhost:81(b) in file – C:\xampp\mysql\bin\my.ini
port = 3307
socket = “C:/xampp/mysql/mysql.sock”
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port= 3307(c) in file – C:\xampp\phpMyAdmin\config.inc.php
/* Bind to the localhost ipv4 address and tcp */
$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1:3307’;after doing this, I go to XAMMP control panel and I can successfully start both Apache and MYSQL. I figured, so far, so good. just to confirm this, I use “netstat -ao” at a cmd prompt, then cross reference the PID’s in task manager and find that port 81 is httpd.exe (apache server) and port 3307 is mysqld.exe (I suppose this is mariadb, since when I open location from task manager, this goes to the mysql subfolder under apache).
next, I go to my browser to install wordpress. I type the below.
localhost:81
this brings up the 1st screen of the wordpress installation that allows selection of language. I select “English” and go to next step. I enter as below.
database name : wordpress
username : dpme
password : “blank” – I have no password
database host : localhost
table prefix : wp_I click next and get the following error message :
=====================================================
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
=====================================================At this point, I wondered if my inputs for username, password, and hostname were correct; so I tried connecting to the database in HeidiSQL and Workbench. I can successfully connect to the empty db in both; although Workbench does complain because it’s hitting Mariadb, instead of MySQL ( I suppose).
btw – when looking at the wordpress db in HeidiSQL and Workbench, I can see the “information_schema” and “test” db’s under wordpress.
so this tells me my login credentials are correct. next, I confirm that I have appropriate permissions for my db user. basically, I gave the user all privileges and grants; but I confirm this in workbench with a show command in SQL.
I’ve also tried different combinations of “database host” in the wordpress 2nd step including “localhost:81”, “localhost:3307”, “127.0.0.1”, etc.
I’d appreciate any comments. Again, I realize this topic has been posted before, and I’ve tried to do due diligence in reviewing many old posts. Frankly, that’s how I got as far as I did in terms of the files that I’ve shown edited above. I’m at a loss as to what to do now. seems like many folks run XAMMP and WordPress under different ports for a variety of reasons with no issues.
thank you.
David
- The topic ‘installing XAMMP and WordPress on different ports’ is closed to new replies.