MySQL CFMX Problems
CFMX 6.1
MySQL 4.1
Connector J 3.0.17
I've recently changed from MS Access to MySQL. I've read all
about the bugs and problems with the connectors and everything has
been updated the way it has been described to. I can get a simple
query working, but for some reason when i use several queries
(loading a page with content from different tables) it just stops,
the MySQL Administrator indicates that the threads are "Sleeping"
but the page hasn't completely loaded... any ideas?
There are some other things that must be done to connect to
the database
(such as passing the usernamee, password, and host info to
mysql_connect()
and storing the connection resource), and those might be in
the include
files. I generally place all of the connection parameters in
a separate file
that is located in a folder that can't be accessed by a
browser, for
security purposes.
Paul Swanson
Portland, Oregon, USA
"Amy Blankenship *AdobeCommunityExpert*"
<[email protected]>
wrote in message news:edk6ui$69c$[email protected]..
> What's in the include(s)?
>
> "83Dons" <[email protected]> wrote in
message
> news:edk5s5$4uk$[email protected]..
> > Here is the php code for the 'read' and 'write'
parts:
> >
> >
> >
> > <?php
> > include '......';
> > mysql_select_db('clinskills') or die("UNABLE TO
CONNECT TO
DATABASE");
> > $sql = "select A1Answer from authorware where id =
'13'";
> > $result = mysql_query($sql);
> > $answer1 = mysql_result($result,0,"A1Answer");
> > print $answer1;
> > ?>
> >
> > <?php
> > include '............';
> > mysql_select_db('clinskills') or die("UNABLE TO
CONNECT TO
DATABASE");
> > $newdata = $_GET['data'];
> > mysql_query("insert into authorware (A1Answer)
values('$newdata')")
or
> > die(mysql_error());
> > mysql_close(); ?>
> >
>
>
Similar Messages
-
PHP and MySQL Connection problem
I am trying to make a PHP MySQL on a remote server connection in Dreamwesaver CS3.
When I enter the information (host, user, password, etc.) and hit TEST, I get the following error message.
"Access Denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured."
I know the user, password, etc. work, as I can access the MySQL database with other software.
I checked with my host and they say there are no permission problems on their end.
I have checked the settings on the Test Server page in Site Setup and everything looks correct and works there.
I have not seen this particular problem described in other forum postings (although there are a LOT of postings on this topic!).
Any help would be appreciated.I thought my testing server was the remote server and is always on as far as I know. I don't know how to turn it on or off.
Is there some other testing server that I should be aware of?
Frank
Date: Wed, 3 Jun 2009 15:43:02 -0600
From: [email protected]
To: [email protected]
Subject: PHP and MySQL Connection problem
I know you are using remote, but is your testing server on? if not turn that on and see if that does it. it just happened to me working on remote server and could not get mysql conn to work, until I turn on my testing (developer server), then I was able to connect to mysql and the tables that I created in phpmyadmin remotly was downloaded.
> -
JSTL - MySQL Connector problem
Hello! I need your help. I don't actually know the reason, but *<sql:query>* doesn't work properly.
So I have such a code:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
<sql:setDataSource var="datasource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/publish"
user="root" password="root"/>
<sql:query var="books" dataSource="${datasource}">
SELECT id, title, price FROM book
</sql:query>
<html>
<head>
<title>A First JSP Database</title
</head>
<body>
<table border="1">
<tr>
<td>id</td><td>title</td><td>price</td>
</tr>
<c:forEach items="${books.rows}" var="row">
<tr>
<td><c:out value="${row.id}" /></td>
<td><c:out value="${row.title}" /></td>
<td><c:out value="${row.price}" /></td>
</tr>
</c:forEach>
</table>
</body>
</html>The error I get when calling http://localhost:8080/DataAccess/bookList.jsp
org.apache.jasper.JasperException: Exception in JSP: /bookList.jsp:7
4: driver="com.mysql.jdbc.Driver"
5: url="jdbc:mysql://localhost:3306/publish"
6: user="root" password="root"/>
7: <sql:query var="books" dataSource="${datasource}">
8: SELECT id, title, price FROM book
9: </sql:query>
10: <html>May be the reason is that the subfolder WEB-INF is badly configured.
I have such subfolders in WEB-INF:
*/lib*
jaxen-full.jar
jdbc2_0-stdext.jar
jstl.jar
mysql-connector-java-3.0.9-stable-bin.jar
saxpath.jar
standard.jar
xalan.jar
xercesImpl.jar
xml-apis.jar
*/tld*
c-rt.tld
c.tld
fmt-rt.tld
fmt.tld
sql-rt.tld
sql.tld
x-rt.tld
x.tldThe question is what is configured or done incorrectly? I am not quite familiar with JSP and JSTL. Thank you for any help.
P.S I have already used MySQL. So it is set and configured as it is needed to be.ThomYork
It didn't help.
Just in case, I run tomcat 5.5.27-2 on Arch Linux; MySQL 5.0.77; Apache 2.2.11
I tried to put mysql-connector-java-3.0.9-stable-bin.jar into
/opt/tomcat/server/lib
/opt/tomcat/shared/lib
It didn't help.
bandarurm
After some manipulation i get such an error in my script:
*exception*
{noformat}org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: "Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused"
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
{noformat}
*root cause*
{noformat}javax.servlet.ServletException: Unable to get connection, DataSource invalid: "Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.bookList_jsp._jspService(bookList_jsp.java:89)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
{noformat}
*root cause*
{noformat}javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused"
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)
org.apache.jsp.bookList_jsp._jspx_meth_sql_005fquery_005f0(bookList_jsp.java:130)
org.apache.jsp.bookList_jsp._jspService(bookList_jsp.java:66)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
{noformat}
dsdsf
I tried this. I downloaded the example with the source and WEB-INF directory. It doesn't work.
Here is an error:
*exception*
{noformat}org.apache.jasper.JasperException: javax.servlet.jsp.JspTagException: In <driver>, invalid driver class name: "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
{noformat}
*root cause*
{noformat}javax.servlet.ServletException: javax.servlet.jsp.JspTagException: In <driver>, invalid driver class name: "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:837)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.executeQuery_005fJstlSqlTag_jsp._jspService(executeQuery_005fJstlSqlTag_jsp.java:116)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
{noformat}
*root cause*
{noformat}java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:264)
org.apache.taglibs.standard.tag.common.sql.DataSourceWrapper.setDriverClassName(DataSourceWrapper.java:46)
org.apache.taglibs.standard.tag.common.sql.SetDataSourceTagSupport.doStartTag(SetDataSourceTagSupport.java:102)
org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag.doStartTag(SetDataSourceTag.java:67)
org.apache.jsp.executeQuery_005fJstlSqlTag_jsp._jspx_meth_sql_005fsetDataSource_005f0(executeQuery_005fJstlSqlTag_jsp.java:137)
org.apache.jsp.executeQuery_005fJstlSqlTag_jsp._jspService(executeQuery_005fJstlSqlTag_jsp.java:88)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
{noformat}Nothing with sql query works. So it seems that the problem is in tomcat's configuration. -
JDBC/MYSQL Connection problems
I'm new to using JDBC so I'm not sure if I'm simply doing something wrong in my code or if I've installed something incorrectly. I've got the JDBC connector/J installed properly as far as I can tell. At least when I run my code I'm not getting an error about the driver not being found. The problem I'm running into is that even though I've double and triple checked the authentication info I keep getting the following error:
Exception in thread "main" java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user: '[email protected]' (Using password: YES)"
The actual connection commands I'm using are as follows:
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/Test", "testusr", "testpwd");
I've checked and rechecked the spelling of my mySQL user & password and as far as I can tell, they work just fine so I can't figure out why I would be getting this error. Any suggestions on things I can try or does anyone see any obvious errors in what I'm doing?The failure is caused not by the JDBC driver but by how the MySQL was configured
when it was installed. By default, MySQL is configured to allow connections that
are created only from within the localhost.
The line
DriverManager.getConnection("jdbc:mysql://localhost:3306/Test?user=testusr& password=testpwd") translates to "create a connection to MySQL running at 'localhost' and use the
'testusr@<hostname.domain>' as user name and 'testpwd' as the password".
If you can see, the <hostname.domain> is replaced with "other value" aside from
the "localhost" which you expect, hence connection is denied.
The '<hostname.domain>' is replaced with the value of either your IP address or
hostname. Therefore, any connections created from outside the host where your
server is running will be denied. Now, making the 'host' value set from
'localhost' to '%' would tell MySQL that you are allowing connections created from
outside the MySQL host to connect to the server.
Another way to go around this is problem is to modify your
"\Windows\system32\drivers\etc\hosts" OR "/etc/hosts" file and give
your loopback address (127.0.0.1) another alias (aside from localhost), e.g.:
127.0.0.1 localhost <hostnameY.domain>
192.168.1.1 <hostnameX.domain> <hostnameY.domain>where you replace <hostnameY.domain> with the name/alias of your computer in
the network. The domain is optional and depends upon the domain name that
your network is using. -
Hi all,
I am new to JSP. I am using Eclipse 3.2. with all lpugins. The following code throws an error. Pleas help me.
<html><body>
<%@ page import="java.sql.*, java.lang.ClassNotFoundException"%>
<%
String connectionURL = "jdbc:mysql://localhost:3306/online_hotel_booking";
String userName = "root";
String password = "root";
// Load the driver class and establish a connection
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con = DriverManager.getConnection(connectionURL,userName,password);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from hotel_details");
while (rs.next()) {
out.println(rs.getString(1));
out.println(rs.getDate(2));
/* closing the connection */
rs.close();
stmt.close();
con.close();
catch (Exception e) {
out.println("Exception!"+e);
%>
</body></html>It throws ClassNot FoundException: com.mysql.jdbc.Driver
Thanks in advanceJDBC questions should be posted in the JDBC forum: http://forum.java.sun.com/forum.jspa?forumID=48
If you take the time to look the active topic listing of the JDBC forum, you'll see that you're not the only one who encountered the problem. Yesterday I answered similar topic on this issue. -
Hi Friend,
I am facing some problem in connecting mysql with jsp .
When I try and connect to mysql with the following connection string
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/testdhiraj?user=root&password=dh");
Statement statement = con.createStatement();
I get an error :
java.sql.SQLException: Communication link failure: Bad handshake
I don't know what is wrong,
as I had tested mysql using telnet and it connects and executes sql nicely.
Waiting for ur reply,
Dhiraj Agrawal
mail to : [email protected]Hi,
You need to make sure that , you have given correct database name, user id and password in the connection url. and also check the jdbc driver is loaded properly. If your mysql is running in the standard port, you need not give the port as 3306.
Here is the example :
import java.sql.*;
Notice, do not import org.gjt.mm.mysql.*
or you will have problems!
public class XampleClass
public static void main(String[] Args)
try {
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
catch (Exception e) {
System.err.println("exception while loading
driver.");
e.printStackTrace();
try {
Connection C = DriverManager.getConnection(
"jdbc:mysql://localhost/test?user=myuser&password=mypwddb");
// Do something with the Connection
catch (SQLException e) {
System.out.println("Exception: " + e);
This is the format for conenction url :
jdbc:mysql://[hostname][:port]/dbname[?param1=value1][¶m2=value2]...
Hope this helps you.
Thanks,
Senthil_Slash -
MySQL socket problems after system update
I have been using my new Mac Mini Snow Leopard server as Squeezebox Server for over a month wihtout problems. After a system update this weekend I started to get MySQL socket errors after reboot.
Started; log sequence number 0 43655
091213 17:10:04 [ERROR] Can't start server : Bind on unix socket: Invalid argument
091213 17:10:04 [ERROR] Do you already have another mysqld server running on socket: /Users/admin/Library/Caches/Squeezebox/squeezebox-mysql.sock ?
091213 17:10:04 [ERROR] Aborting
Although I have posted this issue to the Squeezebox forum (http://forums.slimdevices.com/showthread.php?t=72510) where it primarily belongs to I wanted to hear if anyone maybe had an idea what recent changes in Apple updates could cause this? Maybe someone else has similar MySQL problems with other installations? I am a bit desperate by now so any idea or hint is appreciated.Here was my solution/workaround for this issue to the rest of us poor fellas that have too fight around with Squeezebox server from time to time:
I setup SBS to use the the standard MySQL installation on Mac OS X SL Server since I could get it to run without problems from Server Admin. Here are the instruction from the SBS Wiki:
http://wiki.slimdevices.com/index.php/ExistingMySQLInstance
However, I had to deviate a bit from that in order to make it work since it seems a bit outdated.
First deviation was necessary for the MySQL access privileges. Notice the extra grant to slimserver@localhost. Don't ask me why but this worked. I do also not know whether both grants would be necessary because I haven't tried it. Feel free to improve it:
# mysql -u admin_user -p
Enter password: admin_password
Welcome to the MySQL monitor.
Commands end with ; or \g.
Your MySQL connection id is 103 to server version: 5.0.24a-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database slimserver;
Query OK, 1 row affected (0.22 sec)
mysql> grant all on slimserver.* to slimserver identified by 'slimserver_password';
Query OK, 0 rows affected (0.13 sec)
mysql> grant all on slimserver.* to slimserver@localhost identified by 'slimserver_password';
Query OK, 0 rows affected (0.13 sec)
mysql> flush privileges;
Query OK,
mysql> quit
There were also slight differences necessary in the preferences setup because MySQL socket location was different from the standard one. Here are my db entries ~/Library/Application Support/Squeezebox/server.prefs:
dbpassword: slimserver_password
dbsource: dbi:mysql:database=slimserver;mysql_socket=/var/mysql/mysql.sock
dbusername: slimserver
Notice the extra mysql_socket configuration. -
Oracle Forms 6i - mySQL (Commit Problem)
Hi,
i'm using Oracle Forms Builder 6i to connect to mySQL 3.23.49 via
Oracle Open Client Adapter for ODBC 6.0.5.35.0
Now I have a problem of controlling which form to commit if more than one form are opened.
E.g. I need to open 2 forms (eg. A, B) and only want to commit the changes made on Form A
1.
I open the forms using the follows (i can't use OPEN_FORM('A', SESSION); since mySQL doesn't support)
OPEN_FORM('A');
OPEN_FORM('B');
2.
then I changed both forms
Now the :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are 'CHANGED'
3.
I then press my custom save button on form A (triggers KEY-COMMIT). Inside KEY-COMMIT, it calls COMMIT_FORM, then triggers
ON-COMMIT eventually. In ON-COMMIT, i use the built-in COMMIT to commit the changes.
Then I found that :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are 'QUERY' which is normal. However both
forms are committed.
4.
So I fixed it by: In ON-COMMIT, add RAISE FORM_TRIGGER_FAILURE; after COMMIT. Although it stops committing changes on another
form. But :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are still 'CHANGED'. Then I do a EXECUTE_QUERY
after COMMIT_FORM to change back :SYSTEM.FORM_STATUS, etc to 'QUERY'
5.
It works. Only Form A is committed. However when Form A has a lot of records (eg. >500), it affects performance.
Does anyone know how to solve this problem?
Any help would be greatly appreciated
PeterThe question is not how you disable a key, it might be more how to disable a functionality. What functionality do you want to disable? By default F5 maps to the KEY-MENU-trigger, if thats the function you want to disable, write a NULL; in the KEY-MENU-trigger.
-
MySQL connectivity problem: no validation table provided
hi there,
As a superbeginner, on my Mac G4 OSX 10.4 I am trying to add a MySQL database in Sun JSC 2.1, following the tutorial:
Creating Database Server Types and Data Sources
So far I have managed to
-install mysql 3.1.14 and
-add this as a new database server
When I try to add a data source, I cannot select a validation table (message: No Tables were found. Check your connection information), and I cannot find in the manuals how to make one. When I test the connection the connection status is succeeded, but the validation table status is failed (No validation table provided...)
In a seccond attempt, I also installed MySQL 4.1.21 and navicat (in which the connection seems to be good), but I cannot figure out how to connect this version 4.1.21 to the JSC, because 4.1.21 differs in installation (it uses an installation package in stead of a zipped folder) which is not covered by the tutorial.
Any hints on one of the two attempts, or a suggestion for a database which might give a beginner like me less problems to connect? Thanks a lot.
[email protected]I think the simplest way is:
create a table:if you have mysql 5.x you can di it with mysql tools (mysql administrator or mysql query browser), if you have a non graphical version of mysql you have to create the table with prompt.
Create table Paziente (
codice_fiscale_paziente Char(20) NOT NULL,
nome Char(20),
cognome Char(20))
ENGINE = MyISAM;
than open JSC (it doesn't have a jdbc driver installed to work with mysql, you have to download from mysql website and install in jsc)
servers--> right click -->add data source
than :
data source name : the name you want to use
server type: mysql
database name : your's database name
if you have user autentication in your db, set user and password
set the correct db url
and... test connection
it should work -
J2EE RI and MySQL, JNDI problems
Hi.
I am trying to write a simple J2EE application that would use Entety EJB with bean persisatance. I have downloaded driver from the www.mysql.org, copied it to the lib/system directory and modified J2EE_CLASSPATH in bin/userconfig.bat. I am using reference implementation server and with deploytool in �tools/serverconfiguration/datasourses/standard� I am specifying driver: org.gjt.mm.mysql.Driver or com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource and in datasourses in JNDI Name I write �jdbc/mydb� and in JDBC URL �jdbc:mysql://localhost:3306/this�, problem comes up when I try to reference �jdbc/mydb� from an entity bean, during deployment process of application it says that it is not bound
Binding name:`java:comp/env/jdbc\persondb`
Warning: Reference reference java:comp/env/jdbc\persondb is using a JNDI name that is not bound: jdbc\mydb
I do not get it, what I am doing wrong? Please help me to find out how to bind a JNDI name to MySQLIve been playing with the J2EE RI server for a bit now..
and dispite documentation to the contrary the latest RI DOES NOT use standard naming conventions when referencing jndi resources.
ie:
so if you trying to get : java:com/env/jdbc/persondb
then try accessing it by
jdbc/persondb
omit the java:com/env/ -
While i try to create mysql database through JSP program using query,
the qurey statement doesn't work
stmt.executeUpdate("create database employee;"); is not executing.
The code is as follows : Please Help Me......
try {
Connection con = null;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock","Dude1","");
try {
Statement stmt=con.createStatement();
stmt.executeUpdate("create database employee;");
System.out.println("Statement Executed");
catch(Exception e) {
System.out.println("Statement not Executed");
catch (SQLException ex) {
while (ex != null) {
System.out.println("sql exception"+ex);
ex = ex.getNextException ();
" THANKS IN ADVANCE "It's not common to create databases with Java. I'd say this is especially true of JSPs. You'll have to GRANT permission to access and create tables to every single user that comes in? Are those tables cleaned up when users are done, or does the number of tables grow as the number of users grows? One table per customer? Sounds more like session or cookies to me. Do you validate users to make sure that only authorized users can create tables? Lots of problems, and it doesn't appear that you've addressed any of this from the code you've posted.
It's a bad idea to have code like this in a JSP. Those are for view only. Better to put database code on the server side where it belongs.
% -
DW CS3 to MySql connection problem
I have DW CS3 on Windows Vista. I have installed the Apache
web server and MySql. I've associated the Apache server for testing
and it works fine for page displays, so when I make a change to a
page and hit F12 it is uploaded to the test environment and
displayed in a browser.
MySql is up and running, I can log onto it with the MySql
admin client and see my database (just a testing one).
When I try to test the sql connection I get the message "An
unidentified error has occurred" and I don't have access to the
data.
When I try to test a PHP page it is treated as a file object
and not processed, just loaded for editing.
I don't know what I've set up wrong, any help
appreciated.Was this issue resolved?
I have the same problem now. DW was working fine the one day and the next when I started it it had this connection problem.
I am testing on my local PC. My sites is at http://localhost/
All my connection are working because if I go to http://localhost/index.php I can see my site and if I go to http://localhost/register.php I can even register a new user. It will include the new user details in the data base and everything is working fine. So there is nothing wrong with the connection.
In DW I do have http://localhost/ on the Local Info screen. As I said, all was working fine on the current setup the one day and the next day it did not want to work.
Seems like a very common problem.
I want to buy CS4 and surely hope that the problem has been fixed by now. -
Mysql user problems [solved]
hey, i have a problem with my mysql, when i try to login from shell, every account works, but when i try to login via php, it just says
Could not connect: Access denied for user 'root'@'localhost' (using password: NO)
but i dont even try to login with root, i tried multiple accounts and this is what i get all time...
Last edited by nst (2009-01-22 18:01:55)yeah, i have
extension=mysql.so uncommented
mysqlMySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.0.75
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
this is from phpinfo, as you can see, the module works properly afaik.
now i got rid of it, but i keep getting another error:
Could not connect: Lost connection to MySQL server at 'reading initial communication packet', system error: 111
its kinda funny now, after the 24 hours im installing and configuring this server ) -
Mm.mysql Driver problems
Im trying to get Tomcat to function with mysql database.
I am using Tomcat 4.0.
I recieve this error when trying to connect to mysql:
javax.servlet.ServletException: org.gjt.mm.mysql.Driver
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
I have a classpath setting of:
C:\jdk\lib\mysql.jar
I dont know why it is not finding the class... Maybe its a problem with Tomcat 4.0??Jim
Here is code I use to connect:
context = Server.getContext();
try {
String dbName = context.getInitParameter("DbName");
String dbUsr = context.getInitParameter("DbUserName");
String dbPwd = context.getInitParameter("DbUserPwd");
String conStr = "jdbc:mysql://localhost/" + dbName + "?user=" + dbUsr + "&password=" + dbPwd;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
dbCon = DriverManager.getConnection(conStr);
} catch (Exception ex) {
Server.logErr("DBManager: failed to init connection",ex);
throw ex;
I am using Tomcat 3.2.1 with mm.mysql 2.0.4 and it all seems to work fine.
Hope this helps
Regards
David -
DW CS4 MySQL Connection Problem
I know this one has been covered before but i've been trawling through posts for the past 2 days and still haven't solved my problem.
I remember from using MX Studio and Ultradev that setting up a connection could prove challenging. It seems that CS4 is just as user-unfriendly in this regard. I know that the settings i'm using for the connection must be correct as i'm using them to successfully connect to the database and display its records using a hand-coded page. I've tried disabling Kaspersky and Windows Firewall but to no avail. I noticed one difference between the php script that dw attempted to make and mine is that i'm using mysqli whereas the dw version just refers to mysql. When I click on the Select button to try and select the database i just get "An unidentified error has occurred" - about as much use as a chocolate fireguard - well done to the dw development team for that pearl of wisdom. Is dw trying to find my databse somewhere where it's not located? I noticed that C:/InetPub and its subfolders are marked "read only" but when you uncheck this, it reverts to read only - i don't know if this may have something to do with my inability to set up a connection. I managed to manually set up MySQL, PHP and Apache without problems but this has got me beat. Is it bad design in dw or am i just stupid? Don't answer that! Any help would be greatly appreciated as i know there's a lot of good stuff in dw if i could only make a connection (and i'm on a 30 day trial with this) Why should something that looks so easy be so difficult! Thanks, MarkHi PZ,
You're correct! I just managed to get my connection to work. I looked in my php.ini file and it only had extension=php_mysqli.dll at the bottom of the page (the dll file to which this refers was in the ext folder). So, I just added extension=php_mysql.dll to the end of the php.ini file then downloaded the PHP 5.2.13 zip package from http://www.php.net/downloads.php and then copied the file php_mysql.dll into the ext folder. I got the clue about mysqli not being supported after i'd carried out a Site > Advanced > Remove Connection scripts - that at least gave me a message "Your PHP Server doesn't have the MySQL module loaded or you cant use the mysql(p) connect functions" - before i did this i just got a useless "An unidentified error has occurred" which left me no further forward. Thanks for your help!
Maybe you are looking for
-
How do I move mouselessly to next tune when editing Info?
Often the CDDB gets it wrong with classical CDs and I frequently must edit the information in my library. For pieces, like symphonies, with multiple movements, I need to go into the Get Info screen (Apple-I) and edit the Name field. I usually will co
-
Hello, I recently changed my data plan a few months ago to the 6 GB Data plan with 2 phones tied to my service when I upgraded my phone to the Samsung Galaxy 5. For the most part my wife and I have been doing pretty good at keeping the our monthly d
-
IPod Video not recognized by iTunes
hello, I just got my iPod Video 60G. I currently have USB 1.1 as part of my computer. When I plug it in to any of those ports, iPod works fine. However, I decided to get a PCI USB 2.0 card so I can improve the performance of the iPod. When I plug the
-
0CUSTOMER Special Characters Error in Load
Hi Experts, I am loading Customer Master data from R/3 into BW via 0CUSTOMER_ATTR extractor. Some user-entered fields in R/3 such as NAME, NAME1, STREET etc have some special characters - which look like a square. This data used to come over into
-
Distributi​on kit with DLL
I use LabWindows CVI 8.0.1 on an XP machine. I have distributed several applications to other PCs without any problem. Now I try to distribute an application with the name "client" that includes a DLL and I do not seem to be able to install it on ano