Mysql Access Denied

In a few simple pages, I add/change/delete and list data from
a MYSQL table. It works fine 90 percent of the time. The other 10
percent I get an Access Denied SQL error. If I simply click my
SEARCH button again to list the database, it always works. It is as
if there is some sort of lock on data I have updated and it needs a
second or two to release it. I have tried looping the SQL upon
receiving an error, but this does not work. The page must return
without displaying data, then click again, and then it is
successful.
As I said, this only happens 10 percent of the time, and even
less if I am not so quick going to this list immediately after
making a table update. This happens on my local PC as well as well
as when hosted on the web.
This sound familiar to anyone ?
KEN
Below is an example error page:
Error Executing Database Query.
Access denied for user 'root'@'localhost' (using password:
NO)
The error occurred in
C:\ColdFusion\wwwroot\SGBC\FC\icPsn.cfc: line 309
Called from C:\ColdFusion\wwwroot\SGBC\AM40\apPsnList.cfm:
line 67
Called from using password: line -1
Called from using password: line -1
307 : </cfif>
308 : <cfif this.st_record.sg_fname IS NOT "">
309 : AND psn.FirstName LIKE '%#this.st_record.sg_fname#%'
310 : </cfif>
311 : ORDER BY psn.LastName ,
SQLSTATE 28000
SQL SELECT psn.ID , psn.LastName , psn.FirstName , psn.Descr
, psn.Filename , psn.UPDttm , psn.Up_Psn_ID , psn.EmailAddress ,
psn.PsnPswd , psn.Active , psn.Phone , psn.Ext , psn.ImageDir FROM
person psn WHERE psn.Active = 1 ORDER BY psn.LastName ,
psn.FirstName
VENDORERRORCODE 1045
DATASOURCE dcw0101tst1

Update:
I think this was caused by a CFTRANSACTION tag I had around
the SQL. Apparently, at least on Windows servers, this caused
contention on the folder or files in use by MySQL, and I assume
Windows denied access, and thus the error. It seems CFTRANSACTION
caused a lock of some sort which resolves within a second or two,
but if you update a record and then try to access that same table
immediately, the lock as not been released, at least some
percentage of the time. Since taking out CFTRANSACTION, I haven't
experienced this error.

Similar Messages

  • JDeveloper/MySql: 'access denied'

    I'm trying to develop a web application using JDeveloper/MySql...
    My 'try-out' servlet ends here:
    conn = DriverManager.getConnection("jdbc:mysql://localhost/eyes?user=me&password=pwd");
    saying
    "Access denied for user 'me'@'localhost.localdomain' (using password: YES) 11045 228000"
    user me has been granted 'all' and the database eyes is accessible via the commandline.
    Any help is appreciated!

    This is MySQL issue not JDeveloper.
    Anyway this problem usually occurs when:
    1. there is not localhost or hostname in "user" table (mysql).
    So check whether user table contains two rows for user, one row for "localhost" and the second row for hostname or single row where "%" (any host) is in hostname column.
    Example:
    mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1810 to server version: 4.1.5-gamma-standard
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> \u mysql
    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> select * from user where user = 'test2';
    | Host      | User  | Password         | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections |
    | localhost | test2 | 35a7d8163f9d93b2 | Y           | Y           | Y           | Y           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                |          |            |             |              |             0 |           0 |               0 |
    | machinename  | test2 | 35a7d8163f9d93b2 | Y           | Y           | Y           | Y           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                |          |            |             |              |             0 |           0 |               0 |
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------2. common mistake is when user is created and privileges granted and administrator didn't flush hosts and privileges.
    So login as root and execute "flush hosts" and "flush privileges" commands.
    Example:
    mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1812 to server version: 4.1.5-gamma-standard
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> flush hosts;
    Query OK, 0 rows affected (0.00 sec)
    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

  • PHP/MySQL access denied=restricted+area

    We just migrated to a new OS X Tiger running WebSTAR 5.4,
    w/MySQL 4.1.x, PHP 4.4.0 (I'm a bit vague on the MySQL version and
    am having trouble logging in via terminal to check).
    All my previous login pages set up using DWMX 2004 now refuse
    to redirect to the intended page when I use the correct username
    and password (URL returns
    "degree_login.php?accessdenied=Restricted+Area"). FWIW,
    deliberately typing the wrong username and/or password correctly
    yields the error page. So it seems something is working but not the
    login w/correct user/pwd.
    I know MySQL 4.x changed the password system so that they're
    encrypted, and I fixed this using the MySQL manual instructions
    (old password). But I don't see this as being related to my current
    problem.
    Since I'm really stymied as to where to start, and wondering,
    based on the error in the URL, what anyone might suggest to look
    for. I'm assuming it's still a permissions issue with the MySQL
    table, but I'm not sure why this would be the case. FYI, related
    pages that use the same database, but different table, still work
    fine. Any suggestions greatly appreciated.

    What those error messages are saying is that PHP can't connect to the database.
    This is because it's told to communicate with MySQL via /var/mysql/mysql.sock, but MySQL isn't listening there.
    That could be because your MySQL server is configured differently. Check /etc/my.cnf to see where the server is listening. You can read this file with any application that can open text files - no terminal experience necessary (although if you want to use the terminal, it's simply - 'cat /etc/my.cnf' and look for the 'socket' lines)
    If I reinstall MySQL, will I lose the data in my database?
    That depends, but it is not something you need to do at all, so don't worry about it.
    I read somewhere that I need to edit a file called /var/lib/mysql/mysql.sock, but how do I get to this file in order to edit it? I can't find it anywhere? I've been told it's a "hidden" file, but no-one has told me WHERE it's hidden!
    Red herring. Ignore whatever you read. In either case it's telling you WHERE you need to look - /var/lib/mysql/ but that isn't relevant here.

  • DW CC and MySQL - access denied

    I reinstalled the deprecated Server Behaviors and am having a heck of a time connect DWCC to MySQL in PHP.
    In frustration, I downloaded Navicat for Windows and, using the same credentials, Navicat connects to the MySQL without issue.
    I am running Windows 8.1 and the MySQL is installed on a Synology NAS (DS213).
    All of this is local to my LAN.
    Any thoughts?
    Thanks in advance.
    Bob

    What those error messages are saying is that PHP can't connect to the database.
    This is because it's told to communicate with MySQL via /var/mysql/mysql.sock, but MySQL isn't listening there.
    That could be because your MySQL server is configured differently. Check /etc/my.cnf to see where the server is listening. You can read this file with any application that can open text files - no terminal experience necessary (although if you want to use the terminal, it's simply - 'cat /etc/my.cnf' and look for the 'socket' lines)
    If I reinstall MySQL, will I lose the data in my database?
    That depends, but it is not something you need to do at all, so don't worry about it.
    I read somewhere that I need to edit a file called /var/lib/mysql/mysql.sock, but how do I get to this file in order to edit it? I can't find it anywhere? I've been told it's a "hidden" file, but no-one has told me WHERE it's hidden!
    Red herring. Ignore whatever you read. In either case it's telling you WHERE you need to look - /var/lib/mysql/ but that isn't relevant here.

  • Mysql, JDBC, Linux and Access Denied

    I have just installed a MySQL Connctor/J 2.0.14 (JDBC) to be able to connect to a MYSQL-database on a Linux-server from a java-program on the same server. But I keep on getting an access-right-error. I would be very thankfull if someone could help me.
    From the linux-shell I can connect to the database with mysql:
    [root@dat test]# mysql -u speciale -p specialetestDB
    But when I try to connect from the Java-program I recieve the following error:
    [root@dat test]# java TestDB
    SQL-fejl: Invalid authorization specification: Access denied for user: 'speciale@dat' (Using password: YES)
    The program Is very simple:
    import java.sql.*;
    public class TestDB {
    public static void main(String[] args) {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    Connection connection = DriverManager.getConnection(
    "jdbc:mysql://localhost/specialetestDB?user=speciale&password=x");
    Statement statement = connection.createStatement();
    ResultSet resultSet = statement.executeQuery(
    "Select Vnavn from VidensElement");
    while (resultSet.next())
    System.out.println(resultSet.getString("Vnavn"));
    statement.close();
    connection.close();
    catch (SQLException sqlException) {
    System.out.println("SQL-fejl: " + sqlException.getMessage());
    catch (ClassNotFoundException classNotFoundException) {
    System.out.println("Driver ikke fundet: " +
    classNotFoundException.getMessage());
    catch (Exception instantiationException) {
    System.out.println("Driver kan ikke instantieres: " +
    instantiationException.getMessage());
    Sanne

    the password you have listed as what you use fromthe
    shell vs. what you have in yoour code are not the
    same. they need to be the same.
    other than that make sure you user account in mysqlis
    set up to accept connections from wherever you needit
    to. Thanks,
    The passwords are the same - I just didn't show it in
    the copied text. Actually the shell-dialog is:
    From the linux-shell I can connect to the database
    with mysql:
    [root@dat test]# mysql -u speciale -p specialetestDB
    password: x
    sorry my fault, but it probably was worth checking
    But what you said about my user accounts might be the
    problem In the mysql.user tabel I have 3 instances of
    the "speciale" user, each with a different host: "%",
    "dat" and "localhost".
    Is that what you ment?
    yes. it is possible that the passwords are not the same. so the password for speciale from localhost is not the same as from % or dat. why don't you delete the dat and localhost ones and just leave the % one.

  • MySQL connection with OWB 11gR2 results in "access denied for user"

    Hello,
    I just try to establish a connection to a MySQL database with OWB 11gR2, but I always get the error "access denied for user...". I did the things written on [http://blogs.oracle.com/warehousebuilder/2010/01/owb_11gr2_mysql_open_connectivity.html] and I also used the platform configuration from this description. Newest JDBC driver was downloaded and I put the jar-file into the folder OWB_HOME/owb/lib/ext. The definition of the MySQL platform worked and the entry "MySQL" was created in OWB, but no connection can be established. I also tried other tools like MySQL Administrator in order to find out whether the problem is caused by network configuration or sth. like that, but with this tool the connection works.
    OWB is installed on OpenSuse 11.1 64bit. Does anyone know why this error occurs? Perhaps I missed some configuration tasks, which I don't know so far?
    I'm looking forward to your answers.
    Greetings
    Joerg

    Hi David,
    thank you for your reply. The corresponding user has already got this host setting. Anyway he got the wildcard '%' and with other tools I can connect.
    I solved the problem now due to just trying around with usernames. The error was quite funny: OWB changes the username always into upper case and MySQL cannot handle this username. The username must match 100% to be able to login.
    Now I just changed the user in MySQL and wrote the username in upper case. But in fact I would like to know if it is possible to avoid that OWB changes the username, with quotes it didn't work ;-)
    Greetings
    Joerg
    UPDATE:
    Now I'm facing another problem: the connection works, but I cannot import any metadata. When I click on "Browse" to select the correct schema in MySQL DB, no result is displayed. The user anyway has go the privileges to select data from this schema. I also tried to provide the user with every possible privileges for this schema, but I still cannot select any schema. When I write the schema manually and then try to import database objects iin OWB the error message "definitions of userdefined metadata interface are invalid" is displayed (translated from german, so the wording could be different). Does anybody have an idea what the problem could be?
    Edited by: Scantid on 15.01.2010 00:41

  • [solved] mysql suddenly access denied for user root ..

    Hi folk,
    I am in total panic right now!
    As of an hour ago i suddenly got 'Error establishing a database connection' from all of my sites
    I then first tried to login through phpmyadmin but got #1045 Cannot log in to the MySQL server
    I then tried to login through the terminal but got ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    I am not really sure where to find solutions because primarily this error is on new installs:
    I have tried the following :
    mysql_safe --skip-grant-tables
    [odp@odp ~]$ sudo mysqld_safe --skip-grant-tables &
    [4] 3181
    [odp@odp ~]$ 140115 19:43:50 mysqld_safe Logging to '/var/lib/mysql/odp.err'.
    140115 19:43:50 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    140115 19:43:52 mysqld_safe mysqld from pid file /var/lib/mysql/odp.pid ended
    [4] Done sudo mysqld_safe --skip-grant-tables
    here is the odp.err
    140115 19:25:41 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    140115 19:25:41 InnoDB: The InnoDB memory heap is disabled
    140115 19:25:41 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    140115 19:25:41 InnoDB: Compressed tables use zlib 1.2.8
    140115 19:25:41 InnoDB: Using Linux native AIO
    140115 19:25:41 InnoDB: Initializing buffer pool, size = 128.0M
    140115 19:25:41 InnoDB: Completed initialization of buffer pool
    140115 19:25:41 InnoDB: highest supported file format is Barracuda.
    140115 19:25:41 InnoDB: Waiting for the background threads to start
    140115 19:25:42 Percona XtraDB (http://www.percona.com) 5.5.34-MariaDB-31.1 started; log sequence number 38562281
    140115 19:25:42 [Note] Plugin 'FEEDBACK' is disabled.
    140115 19:25:42 [ERROR] /usr/bin/mysqld: unknown option '--skip-grant-tables'
    140115 19:25:42 [ERROR] Aborting
    140115 19:25:42 InnoDB: Starting shutdown...
    140115 19:25:42 InnoDB: Shutdown completed; log sequence number 38562281
    140115 19:25:42 [Note] /usr/bin/mysqld: Shutdown complete
    140115 19:25:42 mysqld_safe mysqld from pid file /var/lib/mysql/odp.pid ended
    140115 19:35:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    140115 19:35:48 InnoDB: The InnoDB memory heap is disabled
    140115 19:35:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    140115 19:35:48 InnoDB: Compressed tables use zlib 1.2.8
    140115 19:35:48 InnoDB: Using Linux native AIO
    140115 19:35:48 InnoDB: Initializing buffer pool, size = 128.0M
    140115 19:35:48 InnoDB: Completed initialization of buffer pool
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    140115 19:35:48 InnoDB: Retrying to lock the first data file
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    140115 19:37:28 InnoDB: Unable to open the first data file
    InnoDB: Error in opening ./ibdata1
    140115 19:37:28 InnoDB: Operating system error number 11 in a file operation.
    InnoDB: Error number 11 means 'Resource temporarily unavailable'.
    InnoDB: Some operating system error numbers are described at
    InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
    140115 19:37:28 InnoDB: Could not open or create data files.
    140115 19:37:28 InnoDB: If you tried to add new data files, and it failed here,
    140115 19:37:28 InnoDB: you should now edit innodb_data_file_path in my.cnf back
    140115 19:37:28 InnoDB: to what it was, and remove the new ibdata files InnoDB created
    140115 19:37:28 InnoDB: in this failed attempt. InnoDB only wrote those files full of
    140115 19:37:28 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
    140115 19:37:28 InnoDB: remove old data files which contain your precious data!
    140115 19:37:28 [ERROR] Plugin 'InnoDB' init function returned error.
    140115 19:37:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    140115 19:37:28 [ERROR] mysqld: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
    I have also tried the solution where you move the ibdata1 and copy it back with -a to no success.
    The result of mysqld_safe --skip-grant-tabels
    [odp@odp ~]$ mysqld_safe --skip-grant-tabels &
    [4] 3555
    [odp@odp ~]$ 140115 19:49:21 mysqld_safe Logging to '/var/lib/mysql/odp.err'.
    touch: cannot touch '/var/lib/mysql/odp.err': Permission denied
    chmod: cannot access '/var/lib/mysql/odp.err': Permission denied
    140115 19:49:21 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    /usr/bin/mysqld_safe: line 138: /var/lib/mysql/odp.err: Permission denied
    rm: cannot remove '/var/lib/mysql/odp.pid': Permission denied
    /usr/bin/mysqld_safe: line 182: /var/lib/mysql/odp.err: Permission denied
    touch: cannot touch '/var/lib/mysql/odp.err': Permission denied
    chown: cannot access '/var/lib/mysql/odp.err': Permission denied
    chmod: cannot access '/var/lib/mysql/odp.err': Permission denied
    140115 19:49:21 mysqld_safe mysqld from pid file /var/lib/mysql/odp.pid ended
    /usr/bin/mysqld_safe: line 138: /var/lib/mysql/odp.err: Permission denied
    [4] Exit 1 mysqld_safe --skip-grant-tables
    any advice is greatly appreciated
    Last edited by odp (2014-01-15 19:46:39)

    OK super random, it works now.
    First off I too took and added skip-grant-tables to [mysqld] /etc/mysql/my.cnf
    restarted mysqld and finally had passwordless login. From within mysql i ran
    UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
    FLUSH PRIVILEGES;

  • Error...java.sql.SQLException:Access denied for user

    Hi,
    I am getting the following error message while connecting with the MySQL .(O/S :Sun OS 5.6)
    Error.....java.sql.SQLException: Invalid authorization specification: Access denied for user: 'some_user&password@localhost' (Using password: NO)
    Note that i have given all permission to the user using,
    GRANT ALL PRIVILEGES .......................
    The code i have used to connect with the database is,
    import java.io.*;
    import java.sql.*;
    class test
    public static void main(String a[])
    try
    Connection con;
    Statement stmt;
    ResultSet rs;
    Class.forName("org.gjt.mm.mysql.Driver");
    con=DriverManager.getConnection(jdbc:mysql://localhost/db_name?user=some_user&password=some_pass");
    stmt=con.createStatement();
    //do something with resultset
    catch(Exception e)
    System.out.println("Exception in second try.."+e);
    plese guide me on this problem to solve.
    Thankz,
    Bala.

    Hi friends...
    I've read the last post...
    The problem that I have is as follow....
    1. I have installed on my machine MySQL 5.0 Server running
    1.1 I have a database called "base1"
    1.2 User "root", password "works"
    1.3 I have the following sentence to connect it using JDBC
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost/base1", "root", "works");
    More notes:
    - I use the JDBC 5.0
    - My Machine is a Windows XP SP2 Pentium 3.0 512Mb
    and it connects����
    but I have this environment to develop applications, now that I want to connect to Production Environment happens the following:
    2 The Production database is mounted on a Linux Server with MySQL 3.2.
    2.1 I change the sentences as follow:
    Connection con = DriverManager.getConnection("jdbc:mysql://192.168.0.7/base1", "user", "password");
    2.3 But a message appears when I run the Java Program:
    java.sql.SQLException:Access denied for user: '[email protected]' (Using password: YES)
    2.4 As you can see it changes the IP Address...
    More notes:- I have the MySQL Query Browser and I got connection.
    - The IP that display the Error Message is my Second IP configurated on my Network Properties.
    - Server is a Pentium 4 3.0 GHz 2Gb Linux Red Hat 3.0
    I leave this case for the spider... I hope that somebady has the solution.
    What is the problem? Why the JDBC doesn't respect the IP that I wrote.

  • Sql exception access denied

    well as the topic says I get an access denied exception. This is when I try to connect to the database
    java.sql.SQLException: Access denied for user 'Java'@'localhost' (using password: YES)
    I get the same problem when I try to connect with the root user.
    this is the code I'm using, ignore the threads as they do not matter
    devil_server.java
    import java.io.*;
    import java.net.MalformedURLException;
    import java.net.*;
    import java.sql.*;
    import java.util.*;
    public class devil_server
    //variable types concerning userthreads
    static public int uid;
    static public int nou;
    static public ServerSocket skanal;
    public static Vector users = new Vector();
    public static Vector usernames = new Vector();
    public static String user;
    public static String pass;
         public static void main(String arg[])
         try {
              System.out.println("write the user used to access the mysql database with Devil Chat");
              user = Keyboard.readString(); //read mysql username from keyboard
              System.out.println("write the password used to access the mysql database with Devil Chat");
              String pass = Keyboard.readString(); //read password for user from keyboard
              uid = 0;
              nou = 0; //Number Of Users
              skanal = new ServerSocket(5555);
              new Thread(new devil_server_user(uid)).start();
              while(true)
                   if(uid>nou)
                        String buffer = "buffer";
                        String userl = "user";
                        users.add(buffer);
                        usernames.add(userl);
                        new Thread(new devil_server_user(uid)).start();
                        nou++;
            }//end while
              }/*end try*/ catch (Exception ex) {
               ex.printStackTrace();
              }//end catch
              //con.close
         } //end main
    }//end classdevil_server_user.java
    import java.io.*;
    import java.net.MalformedURLException;
    import java.net.*;
    import java.util.*;
    import java.sql.*;
    public class devil_server_user implements Runnable
    public devil_server_user (int uid){this.uid=uid;};
    public int uid;
    public Socket kanal;
    public InetAddress ip;
    public InputStream streamin;
    public OutputStream streamout;
    public BufferedReader bufferind;
    public PrintWriter printout;
    public String lastuserin;
    public String userinput;
    public String sip;
    public int isadmin;
    //variable types concerning mysql database connectivity
    public Statement stmt;
    //public Statement rstmt;
    public ResultSet rs;
    public Connection conn;
         public void run()
              try {
         System.out.println("Listening on port 5555");
         System.out.println("Waiting for clients");
         kanal = devil_server.skanal.accept();
         devil_server.uid++;
         ip = kanal.getInetAddress();
         sip = ip.toString();
         sip = sip.replace("/","");
         isadmin = 0;
         if(sip.equals("127.0.0.1"))
         isadmin = 1;
         } catch (Exception ex) {
         ex.printStackTrace();
         try {
         System.out.println("Incomming request: "+ ip);
         streamin = kanal.getInputStream();
         System.out.println("Input ready");
         streamout = kanal.getOutputStream();
         System.out.println("Output ready");
         devil_server.users.set(this.uid, printout = new PrintWriter(streamout));
         printout = (PrintWriter)devil_server.users.get(this.uid);
         bufferind = new BufferedReader(new InputStreamReader(streamin));
         catch (IOException e){
         e.printStackTrace();
        try { 
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/Java?user="+devil_server.user+"&password=s"+devil_server.pass);
         stmt = conn.createStatement();
         stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
         } catch (Exception e) {
         e.printStackTrace();
         //String request = bufferind.readLine();
         //System.out.println("message from "+ip+" : "+request);
         //printout.flush();
    //forbindelse
    try {
         userinput = (String)bufferind.readLine();
         } catch(Exception e) {
         e.printStackTrace();
         while(!userinput.startsWith("/name"))
         try {
              userinput = (String)bufferind.readLine();
                   } catch(Exception e) {
         e.printStackTrace();
         try
         stmt = conn.createStatement();
         stmt.executeUpdate("INSERT INTO devilchat_users (ip, username, isadmin) VALUES('"+sip+"',' "+userinput.substring(6)+"','"+isadmin+"')");
         new Thread(new devil_server_broadcast("/say "+userinput.substring(6)+" has joined devilchat")).start();
         devil_server.usernames.set(this.uid, userinput.substring(6));
         printout.println("/knock"); //knocks to the client
         printout.flush();
         userinput = (String)bufferind.readLine();
              } catch(Exception e) {
         e.printStackTrace();
         while(!userinput.startsWith("/knock"))
         try {
         userinput = (String)bufferind.readLine(); //waiting for client to knock back
              } catch(Exception e) {
         e.printStackTrace();
         printout.println("/ready"); //tells client it's ready to read userinput
         printout.flush();
         int spoken = 0;
         System.out.println(devil_server.usernames.get(this.uid)+": has connected");
         new Thread(new devil_server_usercheck()).start();
    //starter l�kke som checker for nye input fra useren
         while(true)
         try{
              userinput = (String)bufferind.readLine();
              if(!userinput.equals(lastuserin))
              if(userinput.startsWith("/name"))
              stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
              rs = stmt.executeQuery("SELECT * FROM devilchat_users WHERE uid='"+this.uid+"'");
              rs.absolute(this.uid);
              String oldname = rs.getString("username"); // get old name from database and save it in a string before applying the new name
              stmt = conn.createStatement();
              stmt.executeUpdate("UPDATE devilchat_users set username='"+userinput.substring(6)+"' WHERE uid ='"+this.uid+"'");
              //start a broadcast to tell the name has changed
              new Thread(new devil_server_broadcast("/namechange *** "+oldname+" has changed their name to "+userinput.substring(6)+" ***")).start();
              //change the username in the vector containing usernames
              devil_server.usernames.set(this.uid, userinput.substring(6));
              //start a new listcheck so the list can be updated
              new Thread(new devil_server_usercheck()).start();
              else if(userinput.startsWith("/say"))
              stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
              rs = stmt.executeQuery("SELECT * FROM devilchat_users WHERE uid='"+this.uid+"'");
              rs.absolute(this.uid);
              String sname = rs.getString("username");
              String say1 = userinput.substring(6);
              userinput = "/say "+sname+": "+say1;
              spoken++;
              stmt = conn.createStatement();
              stmt.executeUpdate("UPDATE devilchat_users set spoken='"+spoken+"' WHERE uid ='"+this.uid+"'");
              new Thread(new devil_server_broadcast(userinput)).start();
              else if(userinput.startsWith("/quit"))
              stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
              rs = stmt.executeQuery("SELECT * FROM devilchat_users WHERE uid='"+this.uid+"'");
              rs.absolute(this.uid);
              String name = rs.getString("username");
              printout.println("/quit "+name+" has left devilchat"); //tells client it's ready to read userinput
              printout.flush();
              devil_server.usernames.set(this.uid, "user");
              devil_server.users.set(this.uid, "buffer");
              new Thread(new devil_server_broadcast("/quit "+name+" has left devilchat")).start();
              conn.close();
              kanal.close();
              break;
              lastuserin = userinput;
         catch(Exception e) {
         e.printStackTrace();
    }this is the full exception handling
    java.sql.SQLException: Access denied for user 'Java'@'localhost' (using password
    : YES)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:894)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3808)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1256)
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2032)
    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    :283)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at devil_server_user.run(devil_server_user.java:71)
    at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
    at devil_server_user.run(devil_server_user.java:97)
    at java.lang.Thread.run(Unknown Source)
    I have tried the org driver too and I have tried (url, user, pass) and (url?user=user&password=pass)
    Edited by: Angelwinged_Devil on Mar 13, 2008 6:04 AM

    well it's pretty weird, because I'm trying to make some kind of pattern with the install file I made, although... the install file works and looks like this
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    public class install
        public static void main(String[] args) {
            try {
                // The newInstance() call is a work around for some
                   //older java implementations
                   //org.gjt.mm.mysql.Driver or com.mysql.jdbc.driver
                Class.forName("org.gjt.mm.mysql.Driver").newInstance();
            } catch (Exception ex) {
                ex.printStackTrace();
              try {
              System.out.println("write the user used to access the mysql database with Devil Chat");
              String user = Keyboard.readString(); //read mysql username from keyboard
              System.out.println("write the password used to access the mysql database with Devil Chat");
              String pass = Keyboard.readString(); //read password for user from keyboard
              Connection conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/mysql", user, pass);
              Statement stmt = conn.createStatement();
              stmt.executeUpdate("CREATE DATABASE IF NOT EXISTS Java");
              System.out.println("Database has been created");
              Connection con = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/Java", user, pass);
              Statement nstmt = con.createStatement();
              nstmt.executeUpdate("CREATE TABLE IF NOT EXISTS devilchat_users ("+
              "uid int NOT NULL AUTO_INCREMENT, PRIMARY KEY(uid), "
              +"username varchar(25), isadmin bool, spoken int, ip varchar(15))");
              System.out.println("Table has been created");
              con.close();
              conn.close();
                   } catch (SQLException ex) {
        // handle any errors
        System.out.println("SQLException: " + ex.getMessage());
        System.out.println("SQLState: " + ex.getSQLState());
        System.out.println("VendorError: " + ex.getErrorCode() + "\n");
    }

  • Java error when trying to edit file - access denied

    We have been running Vibe 3.0 for a couple years with no issues but suddenly users have begun to get java errors when trying to edit a file from Vibe. When a file entry is opened and the "Edit this file" link is clicked, a dialog pops up that says :
    Error from command:
    java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
    Has anyone else seen this? Could it be related to some windows security update perhaps? Any ideas how to resolve would be appreciated. This happens with regular users as well as admin.
    Vibe is running on SLES 10 with mysql. We are using IIS Windows Authentication.
    Thanks

    dangross,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • File upload 'access denied'  [i'm desperate]

    I've been trying to fix this issues for months now.
    I've searched everywhere online and while i've seen other postings with this exact issue- i havent seen anyone resolve it. Any help would be appreciated.
    The issue is when i have a form with 3 file uploads and i don't input a file into all 3 fileds i get a error 404 access denied error up subit. If i do have files in each form field it works like a charm. The problem with this is that i can't expect the user to have three files to upload everytime.
    I noticed if i remove the "file" + i i get a file generated at the root of the folder. I don't know if that means anything.
    Also, if i just have a form with one file upload i don't get these issues.
    here is my code.
    <HTML>
      <HEAD>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"/>
        <TITLE>File Upload Page</TITLE>
      </HEAD>
      <BODY>Upload Files
        <FORM name="filesForm" action="uploadTestProccess.jsp" method="post" enctype="multipart/form-data">
            File 1:<input type="file" name="file1" value="asd"/><br/>
                File 2:<input type="file" name="file2" value="null"/><br/>
            File 3:<input type="file" name="file3" value="null"/><br/>
              text4: <input type="text" name="textField4" value="this is a test4"><br>
              text5: <input type="text" name="textField5" value="this is a test5"><br>
              text6: <input type="text" name="textField6" value="this is a test6"><br>
            <input type="submit" name="submit" value="Upload Files"/>
        </FORM>
      </BODY>
    </HTML>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="org.apache.commons.fileupload.DiskFileUpload"%>
    <%@ page import="org.apache.commons.fileupload.FileItem"%>
    <%@ page import="org.apache.commons.fileupload.*"%>
    <%@ page import="java.util.List"%>
    <%@ page import="java.util.Iterator"%>
    <%@ page import="java.io.File"%>
    <%@ page import="java.sql.*"%>
    <%!
    String value4;
    String value5;
    String value6;
    String name1;
    String name2;
    String name3;
    String dir;
    Connection dbconn;
    ResultSet result;
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    </head>
    <%
            //System.out.println("Content Type ="+request.getContentType());
            DiskFileUpload fu = new DiskFileUpload();
            // If file size exceeds, a FileUploadException will be thrown
            fu.setSizeMax(10000000);
            List fileItems = fu.parseRequest(request);
            Iterator itr = fileItems.iterator();
         for(int i=1; itr.hasNext(); i++){
                FileItem fi = (FileItem)itr.next();
                //Check if not form field so as to only handle the file inputs
                //else condition handles the submit button input
         if(fi.getString() == "null") {
         name1 = "wewewe.jpg";
              if(!fi.isFormField()) {
                   //out.println("\nNAME: "+fi.getName());
                //out.println("SIZE: "+fi.getSize());
                   if(i==1){
                        name1 = fi.getName();
                        //dir = "file1/";
                   } else if (i==2){
                        name2 = fi.getName();
                        //dir = "file2/";
                   } else {
                        name3 = fi.getName();
                        //dir = "file3/";
                    File fNew= new File(application.getRealPath("file" +i+"/"), fi.getName());
                //out.println(fNew.getAbsolutePath());
                fi.write(fNew);
                   //System.out.println(fNew.getAbsolutePath());
                   //fi.write(fNew.getAbsolutePath());
                   out.print("success<br>" + fi.getName() + "<br>");
                  } else {
                     //gets field names and values
                  // out.println("Field ="+fi.getFieldName());
                     String name      = fi.getFieldName();
                   if(i==4){
                        value4 = fi.getString();
                   } else if (i==5){
                        value5 = fi.getString();
                   } else if (i==6) {
                        value6 = fi.getString();
                   String value = fi.getString();
                    out.println("Found field with name <b>"+ name +"</b> and value <b>"+ value  +"</b><br>");
                   Class.forName("org.gjt.mm.mysql.Driver");
                   dbconn = DriverManager.getConnection("jdbc:mysql://localhost:3306/xxx?user=root&password=");
                   PreparedStatement sql = dbconn.prepareStatement("INSERT INTO uploadtest (file1, file2, file3, four, five, six) VALUES (?,?,?,?,?,?)");
                   sql.setString(1, name1);
                   sql.setString(2, name2);
                   sql.setString(3, name3);
                   sql.setString(4, value4);
                   sql.setString(5, value5);
                   sql.setString(6, value6);
                   int result = sql.executeUpdate();
              %>
    <body>
    <!--Upload Successful!!-->
    </body>
    </html>I've seen a lot of people talk about folder permissions- but i'm almost positive that is not the issue here.
    If I can get this problem solved i think it will be very benificial to a lot of new users trying to do what i am, considering this code works like a charm (aside from this one issue).
    thanks in advance,

    try this:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="org.apache.commons.fileupload.DiskFileUpload"%>
    <%@ page import="org.apache.commons.fileupload.FileItem"%>
    <%@ page import="org.apache.commons.fileupload.*"%>
    <%@ page import="java.util.List"%>
    <%@ page import="java.util.Iterator"%>
    <%@ page import="java.io.File"%>
    <%@ page import="java.sql.*"%>
    <%!
    String value4;
    String value5;
    String value6;
    String name1;
    String name2;
    String name3;
    String dir;
    Connection dbconn;
    ResultSet result;
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    </head>
    <%
            //System.out.println("Content Type ="+request.getContentType());
            DiskFileUpload fu = new DiskFileUpload();
            // If file size exceeds, a FileUploadException will be thrown
            fu.setSizeMax(10000000);
            List fileItems = fu.parseRequest(request);
            if(fileItems!=null){
            Iterator itr = fileItems.iterator();
         for(int i=1; itr.hasNext(); i++){
                FileItem fi = (FileItem)itr.next();
                //Check if not form field so as to only handle the file inputs
                //else condition handles the submit button input
         if(fi.getString() == "null") {
         name1 = "wewewe.jpg";
              if(!fi.isFormField()) {
                   //out.println("\nNAME: "+fi.getName());
                //out.println("SIZE: "+fi.getSize());
                   if(i==1){
                        name1 = fi.getName();
                        //dir = "file1/";
                   } else if (i==2){
                        name2 = fi.getName();
                        //dir = "file2/";
                   } else {
                        name3 = fi.getName();
                        //dir = "file3/";
                    File fNew= new File(application.getRealPath("file" +i+"/"), fi.getName());
                //out.println(fNew.getAbsolutePath());
                fi.write(fNew);
                   //System.out.println(fNew.getAbsolutePath());
                   //fi.write(fNew.getAbsolutePath());
                   out.print("success<br>" + fi.getName() + "<br>");
                  } else {
                     //gets field names and values
                  // out.println("Field ="+fi.getFieldName());
                     String name      = fi.getFieldName();
                   if(i==4){
                        value4 = fi.getString();
                   } else if (i==5){
                        value5 = fi.getString();
                   } else if (i==6) {
                        value6 = fi.getString();
                   String value = fi.getString();
                    out.println("Found field with name <b>"+ name +"</b> and value <b>"+ value  +"</b><br>");
                   Class.forName("org.gjt.mm.mysql.Driver");
                   dbconn = DriverManager.getConnection("jdbc:mysql://localhost:3306/xxx?user=root&password=");
                   PreparedStatement sql = dbconn.prepareStatement("INSERT INTO uploadtest (file1, file2, file3, four, five, six) VALUES (?,?,?,?,?,?)");
                   sql.setString(1, name1);
                   sql.setString(2, name2);
                   sql.setString(3, name3);
                   sql.setString(4, value4);
                   sql.setString(5, value5);
                   sql.setString(6, value6);
                   int result = sql.executeUpdate();
              }%>
    <body>
    <!--Upload Successful!!-->
    </body>
    </html>

  • Applet database connection : access denied

    Connections to my MySql database can only made from applications running on the host. So when I log on to my domain and run a Java application from the console, I can talk to the database. There's no problem with php either. But when I upload an applet, I get an access denied.
    Anyone knows how to get around this problem?

    Change MySQL so that it will accept connections from users running on whatever system the applet is running on.

  • Dreamweaver 8 + mysql    permission denied

    First off I'm stuck with using XP home and im suspicious of
    that being the problem somehow. Hopefully someone here will know. I
    have been working in unix environment for the last forever so im
    not up to speed with how this works in ms.
    1. I installed mysql, created a database there with three
    tables.
    2. I created a php site in dreamweaver 8 on this same
    machine. I told it to use the remote server for testing and
    everything else.
    3. I create index.php and open up Applications/Databases. I
    create a connection to localhost using the root username and
    password so that dreamweaver will know my table structures.
    4. I verify the mysql user table has a row in it for the root
    user account(duh) and verify the host says localhost.
    5. Dreamweaver says Access Denied. The file may not exist, or
    there could be a permission problem.(yeah so which is it already).
    6. I open up mysql query browser on this machine and connect
    to my database using the query browser and its open and working
    just fine. I know mysql is up and running and I can access it fine
    when not using dreamweaver.
    So, am i missing a driver somewhere? I didn't see any drivers
    listed when I walked through this:
    http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_16575
    Why doesn't this just work?

    xmousex wrote:
    > I completely mirrored this setup on a windows 2000 pro
    machine and had zero
    > problems getting it all hooked up and running in about
    15 minutes. Given that
    > no one here has demonstrated having even a clue on the
    answer, I'm going to
    > conclude that Dreamweaver and Mysql do not work together
    on windows XP home.
    You're free to come to that conclusion, but you would be
    totally wrong.
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • Access denied when trying to edit conf file in DW

    I want to connect Dreamweaver to Mysql, but keep gett an error saying I can't connect to mysql_pconnect.  I'm trying to edit the connection_php_mysql file but when I try to save changes I keep getting access denied.  How can I get the program to accept the change?

    Hi me148me,
    Can you check out the following post and see if it helps? http://forums.adobe.com/thread/725471
    Thanks,
    Preran

  • Report generation failed----​error code:-1720​5; Access Denied.

    Hi, All
        i have a trouble about report generation.it seems the error happened at the "write UUT report"--this step is teststand report generation'DLL.
        detail:
        An error occurred calling 'Save' in 'Report' of 'NI TestStand 2010 SP1 API'
    Access Denied.. Error writing to file 'D:\program\seq\xxx.xml'.
    The file might be open in another application. If file access is intermittently denied, you should try disabling the Microsoft FindFast utility. 
        error code:-17205; Access Denied.
        locationtep 'Write UUT Report' of sequence 'Single Pass' in 'SequentialModel.Seq'
        How to fix it?
        Thanks a lot.
    BR

    Hm, it looks like the file might be open in another application. If you see that file accesss is intermittently denied, you should try disabling the Microsoft FindFast utility.
    CTA, CLA, MTFBWY

Maybe you are looking for