Set up MySQL Database Connection With Netbeans on Ubuntu - php

Trying to integrate netbeans with mysql database management into the IDE as explained here.
I am running Ubuntu 11.1 on my local machine with phpMyAdmin.
I have set the usr name and password and the correct port number, but I can't seem to set the path to the phpmyadmin in the admin tab.
I have tried /usr/share/phpmyadmin/index.php as well as /etc/phpmyadmin .. both time I get a permission denied error and I am not entirely sure what file netbeans actually wants to work with.
Any Help would be truly appreciated.. Thanks in advance

You cant run phpmyadmin as a command line tool so the URI you need would be to the installation on the local webserver like http://localhost/phpmyadmin/index.php ... whatever URL you use to access it in a browser on your machine.
That said I dont know why you would use PHP My Admin when you could use MySQL Workbench or one of the other GNOME or KDE admin apps. They are all pretty much superior :-)

Related

Issue with XAMPP and MySql

I am facing a problem pretty common, I have installed MySql Server because in the past I developed an CRUD app by using Java Swing and Maven, and now I am trying to create same thing, a CRUD app only this time with PHP.
I am following a tutorial from Udemy and this guy is using XAMPP to launch both an Apache Server and a MySQL. But somehow it's interfering with the one already installed on my laptop and cannot make the connection with XAMPP.
I opened my.ini and where says password i put my own from MySQL Workbench, and I see it's using the same port 3306 but still cannot work and I dont know why.
Is there any solution to modify my.ini and establish the connection without uninstalling the MySql Server installed before, because if I do that I ruin the other Java app using it.
Could you please provide the error logs? So the problem can be identified properly. By default, you can get the logs file for Apache in
\xampp\apache\logs\error.log
And for PHP here \xampp\php\logs

I want to use PHP to query my current domain SQL server

I have tried everything
Wamp and XAMPP only provide thier own local server and wont let me specify my own server
I have tried IIS and PHP but it doesnt work at all
I would like a simple way to get my SQL server to use PHP in my domain, i dont need it to be remote access yet
Appreciate some hand holding at this point :(
Thanks
Hi thanks for replying
I have explained below what everything meant by using xammp or want iis and php
The server I have is on the Microsoft SQL server management studio
All of the all in one installers will just user local Host and thier own server and database I want to use mine.
Whenever I try using MySQL connection it says it has activley refused connection.
I've added my credentials into the security section on the server. Allowed remote login and specified ports on the server manager program.
Why isn't there a simple step by step program to enable php use on my server and or connect it to my online site..

How to add ODBC to MAMP on OSX

I'm trying to get ODBC to work on MAMP. I have tried many suggestions and solutions including those already on stackoverflow:
MAMP: Adding ODBC or SQL Server support ,
How do I add an ODBC driver to a MAMP environment?
None are successful so far.
This is the latest I tried.
I downloaded the latest ODBC connector:
http://dev.mysql.com/downloads/connector/odbc/
Installed it with the OSX DMG
I than added the driver in iODBC
I keep getting this message:
Specific driver could not be loaded
and
No suitable image found. Did find: /usr/local/lib/libmyodbc5w.so mach-o, but wrong architecture
Any suggestions?
Looks like you are right about the 32-bit only of iODBC.
You will need to download the Source, and compile from scratch. You will also need to download XCode through the AppStore first, so you have access to gcc and cmake.
Source Code Link: http://www.iodbc.org/downloads/iODBC/libiodbc-3.52.7.tar.gz
Note: From the CLI you can run the lipo -detailed_info /path/to/binary command. This would give you detailed information about a specified binary.
I struggled with this problem for MANY hours (I messed with msql/php, and for years ago, so I consider myself currently a total newbie!). My problem was I couldn't connect my PC to my new online server using ODBC (server was a mac mini running mavericks, trying to connect from a windows machine in my office via mysql odic connector). I finally found a solution that works. here is my situation and environment:
I am converting from Access to MySql/PHP. Application configured as front-end / back-end.
Put my server online so I could export my access back end tables to MYSQL. (some were online at another server, some were on my internal windows 2003 server. ) planning to change front end to php from access vba.
Installed ODBC Administrator on mac mini (mavericks) per google searches.
Went to drivers tab in ODBC Administrator. Set my drivers from USER to SYSTEM in the pulldown on the drivers page. This opened the drivers to appear on the SYSTEM tab of ODBC Administrator (prior to this, the drivers did not appear on the SYSTEM tab of ODBC Administrator).
Added the DSN, the USER, the PORT, and the PASSWORD variables.
I then went to my MAMP application that was running on the Mac. I clicked on [FILE], [EDIT] [TEMPLATE] [my.cnf]. This opened the configuration file. There is a warning - if this gets polluted, it screws up the entire MAMP app.
I made the following change (Inserted a comment above the change).
the bind address was just commented out. 9-5-14
bind-address = 127.0.0.1
This change does not tie MAMP to the localhost (I believe).
I kept scrolling through the file. I also made the next change, and then saved the .cnf file:
Just commented out the next line. Trying to get odbc to work. 9-5-14
MAMP_skip-networking_MAMP
This change I believe tells MAMP to allow remote connections.
On PC, under Data Sources, System DSN tab, using MYSQL ODBC 5.1 driver, I set the datasource name, I set the URL of the online server (which was registered with internic), I set the port, and I entered the User and password to be the same KEYS I set in the ODBC System DSN I added on the Mac server. Then, I pulled down the database tab, and miraculously - the databases in my mac server appeared!
Hope this is helpful to another newbie! I literally worked WAY too many hours trying to find a solution, and it wound up being pretty easy once I lucked into the answer!
.

mysql server rejected the connection php admin requested

I'm rather new to PHP and xampp.
I am using my computer for developing java and php now.
So I have a mysql server installed in my computer already.
I installed xampp successfully. But when I'm trying to access phpMyAdmin, it gives me an error saying
mysql server rejected the connection php admin requested
(this not the actual error, but this is what it means..)
I tried stopping my current MySQL service and installing it again.
I tried configuring config.inc.php which I think is the way do this.
But I couldn't do much with that.
Can anyone tell me how to configure and use my computer for php developing keeping my current mysql server unchanged.
thank you.
PS: There is no problem with my current mysql server.It's working fine.
Problem there is I cant use it with phpmyadmin which i installed with Xampp.
I think it is because Xampp have its own mysql server buldled with it and phpmyadmin configured to use it.
That's the problem.
I want to use my current mysql server insted of the one bundled with xampp.
I have successfully resolved my problem.
I stopped my current mysql service and installed xampp.
Don't forget to uncheck where it ask you to install services on insallation wizard.
And then I started mysql service which was installed already.
and edit config.inc.php as below..
$cfg['Servers'][$i]['auth_type'] = 'config'
to
$cfg['Servers'][$i]['auth_type'] = 'cookie'
and you will be prompted to give your current password and username at phpmyadmin login..
Thank you for all guys who tried to help me..

How to move a local MySql database on a remote server

I have a question about mysql db. I created the site locally and now want to move it to the server. I have created websites. Doing import and export of the database, but now I have a problem. Previously, I always enjoyed the various panels of access (admin). But now the provider gave me only the name & password of the database and ftp. I do not have any control panel (for example cPanel) and I do not understand how to work with the database now.
Thanks for any help
MySQL Workbench has a nice graphical interface for administration of MySQL databases.
I would recommend using a GUI program to access the database and work with it, since it will make the transition much easier if you're used to using a control panel. You can get GUI clients that run as programs on your computer, instead of running on the remote server as cPanel and phpMyAdmin do. This means that they will work regardless of the provider if you have the username and password.
There's many MySQL front-ends out there, but two I would recommend are the official MySQL Workbench if you're running Windows or Linux, and Sequel Pro if you're running Mac (MySQL Workbench can also run on Mac, but I personally prefer Sequel Pro). Both are free.
phpMyAdmin is a tool that you could install on the web server, and if you install it, you could then import the data that you've exported from your local database.
http://www.phpmyadmin.net/home_page/index.php
Alternatively, and I'm guessing the answer to this is "no" but I'll throw it out there anyway, do you have SSH access to the server at all? If so, you could just cat the file and import it straight in to your database.

Categories