Jump to content

Recommended Posts

Posted

All mysql username and mysql databases have to have your cpanel username and an underscore before them. If not then no one else would be able to use the mysql username Henry.

Posted

Your MySQL username will always be "HH_username_choosenuser" for example: "myskillz_henry" in your case.

 

Oh sorry, didnt see your reply @Krydos.

Posted

i have tried testing the access of the database but i still can't, the DriverManager has a problem could u unable it? im using these following codes

 

 

<%@page import="java.sql.*" %>

<%

String mysql_database = "myskill_mmmmm";

String mysql_username = "myskill_lllll";

String mysql_password = "bbbbb";

Class.forName("com.mysql.jdbc.Driver");

Connection connection = DriverManager.getConnection(

"jdbc:mysqli://127.0.0.1/" + mysql_database,

mysql_username,

mysql_password

);

Statement statement = connection.createStatement();

ResultSet result = statement.executeQuery("SELECT * FROM users");

while (result.next()) {

%>

<%= result.getString("up_name") %>: <%= result.getString("up_category") %><br/>

<% } %>

 

the problem is the driver when i tried to remove this

--------------------------------

Class.forName("com.mysql.jdbc.Driver");

-------------------------

the problem re appear , plz help

Guest
This topic is now closed to further replies.
×
×
  • Create New...