Connecting to MySQL in Dreamweaver8
Hey guys i've got Dreamweaver8 and wamp5 installed, my
problem is coming when i try to connect to MySQL through
Dreamweaver. I've followed through all Adobe tutorials including
the Blog tutorial but nothing seem to be working. My web server is
working fine so is my database , i know this because i've tried to
connect to the database using PHP command and it's working fine.
This is how i've defined my web site:
Local Info:
Website Name: MyWebSite
URL:
http://localhost/MyWebSite
Server Technology: PHP MySQL
How do you want to work with your files during development:
Edit and test locally(my testing server is on this computer.
Where on your computer do you want to store your files?
C:\wamp\www\MyWebSite
What URL would you use to browse to the root of your site?
http://localhost/MyWebSite
Copy to another machine: No
For Remote info Access i've put None.
NB Basic Site Definition
Please tell me where i'm getting it wrong because when i try
to make the connection, i believe my snag is at the testing server
but i've tried various paths.
Connection Name: Myconn
MySQL Server: localhost
User: Username
Password: mypassword
When i try to select the database i'm getting the
unidentified error message 404 which suggests possible causes of
connection failure to paths etc.
Please help me i've worked the whole week hoping for a
breakthrough and have tried all sorts of different techniques
suggested by others on forums and websites to no avail.
Does dreamweaver have limitations with PHP/MySQL or is there
something that i'm missing.
Ramson
RamsTheDon wrote:
> Thanks David for the suggestions, I think i can almost
rule the firewall out as i've disabled it, that leaves the wamp
port.
> How do i tell wamp5 to use port 3306? I'm kinda novice.
I don't know. I have never used wamp5. I install Apache, PHP,
and MySQL
independently. A lot of the so-called "simple all-in-one
solutions" have
non-standard settings, so you need to ask in a wamp5 support
area.
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Similar Messages
-
Hi all:
I've set up a LAMP (Linux-Apache-MySQL-PHP of course) server
and I'm getting the good old unidentified error when trying to
connect. The Adobe technote gives a number of seemingly ambiguous
reasons why this can happen. Has anyone else encountered this
problem and if so what is the most common cause? I have a user set
up for Dreamweaver in the MySQL database and I can connect wtih an
admin program from the same computer. The error occurs just as I
click test on the add connection dialog. I can supply more info but
I'm so new at this I don't even know what's important. Any help
would be greatly appreciated.
Thanks!
Ken Ha QuadIfyO wrote:
> I begin to wonder if the makers of Dreamweaver8 intended
to give
> us all a Jigsaw puzzle.
No, the makers of Dreamweaver give you software that works
correctly
with a properly configured setup.
> How can Adobe sit bag and let us keep going through this
stress?
I agree that the setup documentation could be clearer, but
most of the
problems that I've encountered are the result of incorrect
installation
of PHP/MySQL. That's not Adobe's responsibility. The other
main source
of problems is failure to define a testing server correctly
in the
Dreamweaver site setup.
> Following your suggestion, how does one determine a more
uptodate library when
> you have just installed the latest version of
Dreamweaver 8 and EasyPHPserver?
Dreamweaver 8 relies on a correctly configured installation
of PHP and
MySQL. It installs nothing that affects the performance of
PHP or MySQL.
Part of your problem may lie in using EasyPHP. I've just
visited the
EasyPHP site, and see that the latest version of EasyPHP uses
PHP
4.3.10, MySQL 4.1.9, and phpMyAdmin 2.6.1. The latest "real"
versions
are PHP 5.1.4, MySQL 5.0.22, and phpMyAdmin 2.8.
There is a warning in the PHP manual that none of the
"all-in-one"
packages are endorsed by php.net. The fact that EasyPHP can't
be
bothered to update to more recent versions is one reason you
shouldn't
rely on such packages.
> You still keep getting the error message that it cannot
find MMHTTPDB which is
> sitting clearly in the appropriate folders!!
If it were sitting in the appropriate folder, Dreamweaver
would find it.
It sounds as though you haven't defined your testing server
correctly.
To start off with, the site files must be in the Apache
server root. In
the testing server definition, enter the location of the
files in
testing server folder, and the correct URL in URL prefix.
On my setup, the Apache server root is C:\htdocs. So the
correct
settings for a site called "mysite" is as follows:
Server model: PHP MySQL
Access: Local/network
Testing server folder: C:\htdocs\mysite\
URL prefix:
http://localhost/mysite/
However, you may still have problems connecting to MySQL with
EasyPHP,
because it uses PHP 4.3 in combination with MySQL 4.1. You
may need to
set up your MySQL passwords using the OLD_PASSWORD protocol:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/ -
Connection to MySQL via ODBC not working
Hello all together,
I've got a problem with the ODBC connection to MySQL. The connection via ODBC is established and things like tnsping are working.
When I select some data within the SQL*Plus environment, I get no real result. For example "select table_name from all_tables@mysql;" returns nothing.
My entry in listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME=odbc_mysql)
(ORACLE_HOME=D:\oracle\product\11.0.1\db_1)
(PROGRAM=dg4odbc)
My entry in tnsnames.ora:
MYSQL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA = (SID=odbc_mysql))
(HS=OK)
The initodbc_mysql.ora in ORACLE_HOME/hs/admin/:
HS_FDS_CONNECT_INFO = odbc_mysql
HS_AUTOREGISTER = TRUE
HS_DB_NAME = hsodbc
I tried some modifications but I still get no data from mysql database. When I try "select * from customer@mysql;" I get the correct number of records, the correct column names, but the content is always "¬¬¬¬". The odbc driver works, because with MS Access I can fetch the data. I'm using Oracle 11g Release 1 EE and MySQL ODBC 5.1.5.
What could be the reason for this?
Greetings,
Joergcreated in my UTF-8 Mysql DB your table and inserted a record; the select shows:
SQL> select * from "movieclass"@mysql;
idClass
ClassName
123
H e l l o
As you can see the content is there, the "space" between the letters is related to unicode. Each character is interpreted by 2 bytes and SQL*Plus wrongly displays both. Using iSQLPLus or SQLDeveloper does not show the "space" between the letters.
Here the data type mapping:
SQL> desc "movieclass"@mysql;
Name Null? Type
idClass NUMBER(3)
ClassName NOT NULL NVARCHAR2(50)
What's the exact version of DG4ODBC you're using? 11.1.0.7?
According to the listener file you're using DG4ODBC on Windows. There was a high/low byte issue in DG4ODBC for Windows. This issue is fixed in 11.1.0.7 and a certain patch. So I recommend you to get first the 11.1.0.7 patchset (if you don't already have it installed):
6890831 Oracle Database Family: Patchset
11.1.0.7.0 PATCH SET FOR ORACLE DATABASE SERVER 11.1.0.7.0
and then please apply also the latest patch:
8689191 Oracle Database Family: Patch
ORACLE 11G 11.1.0.7 PATCH 16 BUG FOR WINDOWS 32 BIT 11.1.0.7.0
There was a high/low byte issue
Edited by: kgronau on Aug 11, 2009 10:28 AM -
Can't connect PHP/MySQL 404 error
Wow, the learning curve is killing me. Yet another challenge. I'm using Dreamweaver CC and this tutorial http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html
I'm at this step:
Open comments.php. You must have a PHP page open in the Document window to create a MySQL connection.
In the Databases panel (choose Window > Databases), click the Plus button on the panel and select MySQL Connection.The MySQL Connection dialog box appears.
Type connTest as the connection name.
For the MySQL Server, type localhost.If you are using the MAMP default ports on a Mac, use localhost:8889.
For the User Name, type phptestuser.
Type the password you chose for the phptestuser account in the Password field.
For the Database, type php_test.Note: You don't need to precede the underscore with a backslash here. It was inserted by phpMyAdmin in the previous section (see Figure 20) only because phpMyAdmin uses a query that permits wildcard characters.
Click Test.Dreamweaver attempts to connect to the database. If the connection fails, do the following:
Double-check the server name, user name, and password.
Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying a Testing Server for Dreamweaver).
Verify that the web and MySQL servers are both running.
Temporarily disable any firewall or security program. If the connection works, you need to configure the security program to permit communication between Dreamweaver and MySQL.
Click OK. The new connection appears in the Databases panel.
Expand the connTest connection, and then expand the Tables branch. You'll see the comments table in the database, which you can expand to reveal the details of the table columns (see Figure 23).
As far as I can tell I have followed this tutorial to the letter.
As far as I can tell, XAMPP/php mySQL are all running fine, the files are in the correct place and everything should be working. However when I hit test I get a 404 error. (Same error when I hit the select button.)
The suggested problems on the 404 message are:
1. There is no testing server running on the server machine.
Pretty sure the testing server is running. Is there any way to test this, other than to note that xampp is definitely running right now and that I can log into phpMYadmin no problem?
2. The testing server specified for this site does not map to the http://localhost/php_test/_MMServerScripts/MMHTTPDB.php URL Verify that the URL Prefix maps to the root of the site.
Ummm...I'm pretty sure I put things where I was told to put them in the tutorial, but I'm lost at this point where I should verify what. A clue here? The files are where they are supposed to be, but maybe I entered something wrong? Except...I'm not sure what that could be or where to find it. Whatever IT is.
Everything in local files is looking good.
Thanks for your help!
PS: Extra points to anyone who figures out how to make copy/pasteable error messages! These buggers are the bane of my life!Bgupta, you rock!
I hope you have copied the "mysql.php" and "MMHTTPDB.php" files from "C:\Users\username\AppData\Roaming\Adobe\Dreamweaver CC\locale\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts" to "C:\xampp\htdocs\phptest\_mmServerScripts"
This was EXACTLY the problem. I checked the tutorial and I couldn't even find where the tutorial said to do this. (If I missed it, let me know where in the tutorial it was, please.)
Fixed! -
I can't connect to MySQL database from The JSP Standard Tag Library
Hi All !
I have a problem, please help me anybody !
I don't connect to MySQL database from jsp page using JSTL tag but from servlet all work correctly. I set my path and put �mysql-connector-java-3.1.13-bin.jar� in ENVIRONMENT WinXP(classpath=C:\Java\jdk1.5.0_10\jre\lib\ext\mysql-connector-java-3.1.13-bin.jar) and in War project folder �WEB-INF/lib� and in [TomcatServer]\common\lib.
I have in folder�WEB-INF/lib� following files:
antlr.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-fileupload.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
jsf-api.jar
jsf-impl.jar
jstl.jar
mysql-connector-java-3.1.13-bin.jar
standard.jar
struts.jar
I'm using:
NetBeans 5.5 Build200610171010 (bundled Tomcat 5.5.17)
Ent.Pack 20061020 Visual Wb Pack 061103
OS WinXP SP2
Java 1.5.0_10
MySQL 5.0.18-nt
1:<%@page contentType="text/html"%>
2:<%@page pageEncoding="UTF-8"%>
8: <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
9: <%@taglib uri="http://java.sun.com/jstl/sql" prefix="sql"%>
10:
11: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
12: "http://www.w3.org/TR/html4/loose.dtd">
13:
14: <sql:setDataSource var="ds"
15: driver="com.mysql.jdbc.Driver"
16: url="jdbc:mysql://localhost:3306/test"
17: user="root"
18: password="xxxx"/>
19:
20:
21:<sql:query sql="select name, age from People" var="res"
22: dataSource="${ds}"/>
I have received report on mistake when entered code at the top:
�/index.jsp [21;0] According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions�
I used instead of (dataSource="${ds}")->(dataSource="ds") but this did not work.
After build and run I have received
=========================================START=================================
HTTP Status 500
type Exception report:
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /index.jsp(21,0) According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
root cause
org.apache.jasper.JasperException: /index.jsp(21,0) According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:955)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Validator.validate(Validator.java:1489)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
Apache Tomcat/5.5.17
=======================================END================================
Error: "According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions" - but according to documentation such parameter possible.
BUT WHEN JOINING With DATABASE FROM SERVLET ALL WORK FINE.
I read this doc - [http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html], this applicable if I Tomcat Admin, but i'am not Admin
I simply user, i.e. I want to place its database on virtual host (Tomcat+(JSP-JSTL)+MySQL).
There is idea how can resolve this problem
Thank you in advance ;)For all how have similar problem.
Decision instead of these ways
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
it is necessary to indicate these
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -
How can I connect to MySQL external database
Hello.
I have a SAP system running in SQL Server 2003.
I need to connect to external MySQL DB., to operate with this information in ABAP program.
I have done the step necesary... I mean I go to DBCO transaction and configure the connection like this:
DB CONNECTION --> AFIS
DBMS --> MSS
user name --> xxxxxx
DBpass -->xxxxxx / xxxxxx
Conn Info -->MSSQL_SERVER=192.168.1.233 MSSQL_DBNAME=alliance OBJECT_SOURCE=alliance
I do a test program, when I do the statement CONNECT TO, sy-subrc 0 and connection = DEFAULT... I mean, with this form I cannot connect to MySQL Database...
Can you help me to do this?? I think the problem it's the connection string in DBCO... but I'm not sure...,
Would be possible to connect by MySQL ODBC??? I mean , installing the ODBC driver in my SAP server, and using this in ABAP Program??
Thks.
DATA: BEGIN OF wa,
cod_modelo(20),
END OF wa.
DATA: dbs TYPE dbcon-con_name.
DATA: con(20) TYPE c.
DATA : ls_wa LIKE wa.
con = 'AFIS'. "DB Connection in DBCO above
EXEC SQL.
CONNECT TO :con
ENDEXEC.
WRITE sy-subrc. ---> The result it's 4
EXEC SQL.
GET CONNECTION :con
ENDEXEC.
WRITE : con. --> The result it's DEFAULT
EXEC SQL.
SET CONNECTION DEFAULT
ENDEXEC.
write : con. --> The result it's DEFAULT> It's for it, that when I go to DBCO... in DBMS ---... I can select Oracle, MSSQLServer, DB2... for this Databases..., exists the library (lib_dbsl)???
yes, for all those databases exists the database interface library.
> In resume:
> IT'S NOT POSSIBLE CONNECT TO MYSQL!!! ... I cannot believe it!!!...
Well - as far as I remember there were some times ago efforts to port SAP applications to MySQL. That would explain why there's also a file "DDLMYS.TPL" created if you execute R3ldctl during a system copy - amongst DDL files for all other databases. I believe this was at the time MySQL was promoting SAPDB/MaxDB.
MySQL is historically not a database engine for software, that requires transactional integrity; there were extensions to support that (InnoDB or others) and there was no customer demand in getting MySQL as engine for SAP applications. And only develop an interface to be able to connect to an external MySQL engine is not worth the effort.
However, there is hope Some BusinessObjects applications also run with and against MySQL engines, depending on how the strategy to integrate those into the SAP software stack there may (or may not) be an interface for that database in the future.
Markus -
Connection error mysql database in Dreamweaver
the error message is - HTTP error code 404 file not found. here are some possible reasons
screen shot - http://netwizlk.site50.net/images/DW-error.jpg
1)there is no testing server running on the server machine.
2)the testing server specified for this site does not map to the http://localhost/_mmServerScripts/MMhTTPDB.php verify that the URL prefix maps to the root of the site.
guy pls help me to solve this problem. I tried several times to connect my mysql database with dreamweaver but ended up having this error I reinstalled dreamweaver cs4 and XAMPP still the error is not rectified my both remote and local files are stored in XAMPP server location called in c:\xampp\htdocs\htdocs\myweb
anybody who could give me a speedy solution for this issue will be highly appreciated thanks alot guys.c:\xampp\htdocs\htdocs\myweb
MM serverscripts must be at the root level of the virtual server, that is directly in the htdocs folder.
Mylenium -
Connecting a MYSQL database in Dreamweaver
Hi All,
I'm tryting to connect a mysql database based locally and am getting the error:
HTTP Error Code 404 File Not Found. Here are some possible reasons for the problem:
1) There is no testing server running on the server machine.
2) The testing server specified for this site does not map to the http://localhost/_mmServerScripts/MMHTTPDB.php. Verify that
the URL Prefix maps to the root of the site.
What does this mean?
How do I start the testing server? I'm unable to locate the folder where the database files are stored as the database has been created locally on my machine. Everything hace been created locally so I know that point 2) could well be irrelavant.
Please can somebody help?
Many Thanks
GordonThe functions for connecting to a database were mostly deprecated. But if you enable them in CS6 Cloud/CC then they will be the same.
-
Error when connecting to MySQL Database
I am trying to connect to MySQL and receive an error everytime. I have attempted to talk to Bluehost (who my site is hosted thru) and they said it is not on their end and not something they can help me with. I set up a new MySQL Database with Bluehost and then set up the site through DW and everything went fine. I secured an ftp connection and went on to connect to MySQL. When I enter in my credentials for SQL Database, it returns:
HTTP Error Code 404:
Reason 1. No testing server running on the server machine.
Reason 2. Testing server specified for this site deos not map to the http://my_domain.com/_mmServerScripts/MMHTPDB.php URL. Verify the URL Prefix maps to the site.
The testing server model I am using is set to PHP MySQL and URL Prefix I am using (my_domain.com) is my website URL. I watched a YouTube video someone suggested elsewhere on how to add MMHTTPDB.php and mysql.php files to _mmServerScripts folder since the folder is empty but unfortunately, those files are not found on my computer. I assume they were supposed to be installed when I installed DW, but they are not here. I have done a general search of the comp and looked in each folder that was installed with DW and sadly, no files that match those names. What can I do? How can I make an SQL connection? Please help. It is greatly appreciated.
-SharonYour answer can be found somewhere in here http://forum.wampserver.com/read.php?2,83382,88694
My hosts file (c:\windows\system32\drivers\etc\hosts) looks like
# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
::1 localhost -
Error when connecting to mysql
hi
i m getting error when i want to connect with mysql
the errors is below
MySQL JDBC Driver not found ...
Exception in thread "main" java.lang.ClassNotFoundException: org.gjt.mm.mysql.D
iver
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:130)
at test.testDriver(test.java:42)
at test.test(test.java:12)
at test.main(test.java:127)
plz help me
kaleemhttp://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=%2Bforum%3A48&qt=%22java.lang.ClassNotFoundException%22&x=9&y=10
-
Dear Fellas:
I received "database error #2002 can not connect local mysql server to socket through '/var/run/mysqld/mysqld.sock'(2)" on mac os x 10.9.2.
mysql info:
ps -ef | grep mysql
0 66 1 0 11:06AM ?? 0:00.04 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
74 225 66 0 11:06AM ?? 0:02.50 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.err --pid-file=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.pid --socket=/var/run/mysqld/mysqld.sock
501 952 947 0 3:52PM ttys000 0:00.00 grep mysql
Please help!!Fascinated and guessing:
Something related to sock(2) because that's not part of your copied info. I'm thinking you've doubled up on sockets and the second socket doesn't exist, meaning you should be connecting to the first socket "mysqld.sock" whether automatic or not.
I've only used GUI tools on purpose, so does this mean you've already got MySQL running and you tried to launch it again manually? Perhaps you already have one instance of a db and you're trying to launch a second instance, and the two can't coexist with a single user local db?
Assuming this is all local, I'd shut down the db service and restart it, out of hand. I've seen similar messages when I set the db to start up on boot, and it didn't finish shutting down when I tried to restart it manually. Usually the GUI won't let me turn it on because it reports it's already running, but in that case it hadn't finished performing what the GUI was reporting.
Just speculating. -
Mysql_connect "Lost connection to MySQL..." error 61
A web developer is getting this error on a test web server of ours that is running 10.5.7 Server.
"Warning: mysql_connect() function.mysql-connect: Lost connection to MySQL server at 'reading initial communication packet', system error: 61 in..."
I've seen other postings online for this error suggesting that the line containing 'bind-address 127.0.0.1' be commented out within /etc/my.conf... but this line doesn't exists on my installation.
MySQL and php have been working well for other databases and developers. This is a newly created database.
Has anyone else seen this error and found a fix?
Thanks!This is more than likely a firewall problem on your users end. I just ran into this when moving my servers to a colocation. Everything was fine until i tried to connect to an outside database from the machines behind the new firewall. was set to allow 3306 in, but not out. And would connect without issues to localhost:/var/mysql/mysql.sock .
from the machine trying to connect from try
shell> telnet <servername> 3306
should be able to login. if refused, then port is closed.
------- -
hello,
to make a connection to MySQL DB in my webapp. I want to use a
connection pool
I have download the commons-dbcp-1.2.1.jar.
in my webApp. I have a simple class that implemnt a sinple connection to the data base
public SQLFactory()
createConnection();
private void createConnection()
try
Class.forName(driverName).newInstance();
this.connection = DriverManager.getConnection(Url,"root","ungermysql");
}catch(Exception ex){
ex.printStackTrace();
to make a connection to the database I imake an instance of SQLFactory
how to implement or to use the connection pool ???
how to create a connection via connevtion pool ???
thanksok
public class SQLFactory {
private Connection connection = null;
private Statement stmt = null;
private ResultSet rset = null;
private DataSource dataSource=null;
private String Url = "jdbc:mysql://localhost/CarsDB";
public SQLFactory()
createConnection();
private void createConnection()
try
dataSource = setupDataSource(Url);
connection = dataSource.getConnection();
}catch(Exception ex){
ex.printStackTrace();
public static DataSource setupDataSource(String connectURI)
ObjectPool connectionPool = new GenericObjectPool(null);
ConnectionFactory connectionFactory = new
DriverManagerConnectionFactory(connectURI,null);
PoolableConnectionFactory poolableConnectionFactory = new
PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
PoolingDataSource dataSource = new PoolingDataSource(connectionPool);
return dataSource;
public getData(String query)
try
stmt = dataSource.createStatement();
rset = stmt.executeQuery(query)
while(){
I connect my Database from more classes and more jsp
it is Ok to make an Instance of SQLFactory in each class
and each jsp ?????
thanks -
Connect to mysql in another machine
Hi, there,
I have two database. One is oracle in my local machine, another is mysql in another machine. Now, I made a jsp program to control the two database concurrently. When I connect to mysql, I got errors:
Internal Servlet Error:
javax.servlet.ServletException: Server configuration denies access to data source
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at jspForOracle._0002fjspForOracle_0002fmodiProcess_0002ejspmodiProcess_jsp_1._jspService(_0002fjspForOracle_0002fmodiProcess
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java)
My local machine is : Redhat7.1, tomcat and oracle
Mysql machine is : Slackware, tomcat and mysql
I can ping and ssh the mysql machine. And I grant the mysql table for the permission to access the table. But still the same thing. What the problem?
Thank you in advance
peterin your error message:
javax.servlet.ServletException: Server configuration denies access to data source
The server being referred to is the mysql server. Mysql has uid and password like all db's, but in addition, it has security that is sensitive to the source of the connection. Just because you have a valid uid and password doesn't mean that you will be able to connect from anywhere.
This data is in the user table of the mysql database, which is included by default in every mysql installation. What you need to do is edit the privileges of the user account that you're using to connect to mysql from the jsp. There is some good documetation on user administration here:
http://www.mysql.com/documentation/mysql/bychapter/ -
Can't connect to MySQL from Oracle 11g R1
Hello Oracle's guru.
Sorry for my English it's not my native langauge
Enviroments: Oracle 11g R1, Windows 7, ODBC Driver 5.1.8
I have a some problem with creation gateway to connection to MySQL, and I hope somebody can help me.
So,
1) ODBC name - MYSQLDSN
2) initMYSQLDSN.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO = MYSQLDSN
HS_FDS_TRACE_LEVEL = 0
3) listener.ora
# listener.ora Network Configuration File: E:\app\voxa\product\11.1.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=MYSQLDSN)
(ORACLE_HOME=E:\app\voxa\product\11.1.0\db_1)
(PROGRAM=dg4odbc)
4) tnsnames.ora
# tnsnames.ora Network Configuration File: E:\app\voxa\product\11.1.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
CXWH =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CXWH)
MYSQLDSN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
(CONNECT_DATA =(SID = MYSQLDSN))
(HS = OK)
Then I trying to connect to MySQL using sql*plus:
C:\Windows\system32>sqlplus
SQL*Plus: Release 11.1.0.6.0 - Production on Ср Июн 1 12:13:39 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
login: system
pass:
Connect to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create public database link MYSQLDSN
2 connect to DEMO identified by "DEMO" using 'MYSQLDSN';
Channel was created
SQL> select * from items@MYSQLDSN;
select * from items@MYSQLDSN
Error in line 1:
ORA-28500: connection with ORACLE with other system return message:
[MySQL][ODBC 5.1 Driver][mysqld-5.5.12]You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right
syntax to use near
'"ITEMS_KEY",A1."ITEM_NAME",A1."ITEM_CATEGORY",A1."ITEM_VENDOR",A1."ITEM_SKU",A1
.' at line 1
ORA-02063: предшествующий 2 lines из MYSQLDSN
If I trying create new ODBC mobule via OWB, I had next error:
[MySQL][ODBC 5.1 Driver][mysqld-5.5.12]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"DUAL"' at line 1
ORA-02063: предшествующий 2 lines из OWB_56
What I do wrong? Please help meHi,
You can download the 11.1.0.7 patchset from My Oracle Support -
support.oracle.com
as patch 6890831.
Once logged in click on 'Patches and Updates' and enter the patch number as 6890831 and choose whichever platform you are running.
the readme explains how to apply the patch to an existing 11.1.0.6 install.
The url you posted is only for complete product installs, but 11.1.0.7 is only a patchset that must be applied to an existing install.
Regards,
Mike
Maybe you are looking for
-
I purchased audio books from Itunes and they aren't showing up on the purchased list so I can't down load them to my new computer. I have authorized my computer. So any suggestions?
-
How to create the setup file injava
hi am new to java... is it possible to create setup file in java like in .net.. if yes how?
-
Continuation of line item data to next page in SmartForm
Hi, Currently i had a requirement in SmartForm. Iam displaying the line items from bseg table in main window and totals of credit and debit in the total window which comes under the main window. If the line items are more and it continues to next pag
-
Slow start (white frame) when hardware acceleration is on
When I launch FF4, I see a white windows frame for 2-4 sec before it actually show the interface inside the frame. This is not happening if I uncheck the "Use hardware acceleration" checkbox. However, I would like to use it... My System is a new Dell
-
Good day, As per the title of this forum "New to Java Technology", I'm expecting to find information for the new comers Regardless how powerfull Java is/could be, finding clear and precise information is a real nightmare! I have an applet which attem