0

When I create a new mysql db, slashdb's test connection fails.

Here is how I log into mysql:

$ mysql -u 7stud -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.5.5-10.4.13-MariaDB Homebrew
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| chat |
| ectoing_repo |
| ejabberd |
| information_schema |
| mydb |
| mysql |
| performance_schema |
| test |
+--------------------+
8 rows in set (0.00 sec)

mysql> use mydb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+----------------+
| Tables_in_mydb |
+----------------+
| cheetos        |
| greetings      |
| mody           |
| people         |
+----------------+
4 rows in set (0.00 sec)

mysql> select * from people;
+----+--------+------+
| id | name   | info |
+----+--------+------+
|  1 | 7stud  | abc  |
|  2 | Beth   | xxx  |
|  3 | Diane  | xyz  |
|  4 | Kathy  | xyz  |
|  5 | Kathy  | xyz  |
|  6 | Dave   | efg  |
|  7 | Tom    | zzz  |
|  8 | David  | abc  |
|  9 | Eloise | abc  |
| 10 | Jess   | xyz  |
| 11 | Jeffsy | 2.0  |
| 12 | XXX    | xxx  |
| 13 | XXX    | xxx  |
+----+--------+------+
13 rows in set (0.00 sec)

In the slashdb form for creating a new database, here is the info I entered:

Hostname: 127.0.0.1
Port: 80
Database Login: 7stud
Database Password: **
Database Name: mydb

Then I hit the "Test Connection" button, whereupon I get a spinning wheel, which disappears after a few minutes, but no "Connection Successful" message. What am I doing wrong?

Now, I'm using port 3306:

mysql> SHOW GLOBAL VARIABLES LIKE 'PORT';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port          | 3306  |
+---------------+-------+
1 row in set (0.00 sec)

but when slashdb tries to connect, I get the error:

Host localhost:3306 is not accessible
7stud
  • 46,922
  • 14
  • 101
  • 127
  • Does this answer your question? [Mysql localhost != 127.0.0.1?](https://stackoverflow.com/questions/19712307/mysql-localhost-127-0-0-1) – Progman Aug 04 '20 at 19:32

1 Answers1

-1

Your port is wrong in the database connection. You said that your MySQL is configured on port 3306, but you also posted your SlashDB config for database with port 80. Please change that to 3306.

Also, not sure how if you don't need to enable remote access to MySQL. Even if your SlashDB is running on the same machine as the MySQL database, it uses TCP/IP to connect.

Victor Olex
  • 1,458
  • 1
  • 13
  • 28