MyBB Community Forums

Full Version: Relational tables, Properties file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am working with the a plugin extension written in java. In particular, the extension uses the following properties file:

#
# Database Properties
#

# Database properties are the properties defined at
# http://commons.apache.org/dbcp/api-1.2.2/org/apache/commons/dbcp/BasicDataSource.html
database.driverClassName=com.mysql.jdbc.Driver

# Specify the url for MySQL, and a valid existing database (UserInfo)
database.url=jdbc:mysql://localhost:3306/UserInfo

# Specify a valid MySQL username and password.
# If the table has not yet been created, the MySQL user must 
# have DDL privileges
database.username=YOUR_DB_USERNAME_HERE
database.password=YOUR_PASSWORD_HERE

# Adjust to fit your own project
database.maxActive=10
database.maxIdle=10
database.maxWait=1000

I am having trouble identifying my hostname and port. I am using 000webhost.com as my host but I do not know the port number. Let me start by showing what I know:

MySQL Database: a7504178_Users
MySQL User: a7504178_Users
MySQL Password: *************

Within my host, I click on 'Enter phpMyAdmin' and it redirects me here: http://sql2.000webhost.com/phpMyAdmin/in...0-ToHDiXm5

Knowing this data, how do I establish a connection to this database using the MySQL command line tool?

Also, the properties file indicates it needs a 'UserInfo' table. I've already created that under my database, but I need 'UserInfo' to have/inherit the username and password fields that mybb_users uses...how might I achieve this relation?


-Joseph
Config lines:
database.url=jdbc:mysql://sql2.000webhost.com:3306/a7504178_Users
database.username=a7504178_Users
database.password=*************

MySQL command line:
mysql -h sql2.000webhost.com -u a7504178_Users -p a7504178_Users

3306 is the default MySQL port used pretty much everywhere. Additionally, you will need to make sure that the a7504178_Users account has permission to connect from the IP address of the server running the Java application or MySQL client (not just localhost/host's IP addresses).
Thanks for the response,

I try and connect to this host from the command line MySQL, and thus, when I specify to the command prompt the following:

mysql -h sql2.000webhost.com -u a7504178_Users -p a7504178_Users

It tells me that the Host '75.84.xxx.xx' is not allowed to connect to this MySQL server.

I do appreciate the continuous support.