I installed PHP and Apache successfully, then when I installed MySQL I encountered frustrating problems - mysql

I have looked at lots of forms and threads on this site.
First I installed MySQL using msi installer.
Configuration settings:
- detailed configuration
- developer machine
- multifunctional database
- initial path
- decision support
- enable tcp/icp networking, port 3306, add firewall exception for this port.
- enable strict mode
- best support for multilangualism
- install as windows service, include bin directory
- entered root password.
Then when I clicked execute it freezes after writing the configuration file.
- I closed that window.
Then when I opened MySQL Command Line Client and typed in the root password i get this..
ERROR 2003: Can't connect to to MySQL server (10060)
I then opened up command prompt and typed.
C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld --install
got message:
Install/remove of this service denied.
I ran the initial configuration as administrator and I have checked that port 3306 is open.
Hope this is detailed enough.
Thanks.

I would suggesting uninstalling them all and reinstalling them with a package such as LAMP (for linux) or XAMPP (for windows). Much easier to install and set up, tutorials everywhere.

Can you get to the MySQL server instance config wizard in start menu
Is the MySQL service running?
whats the conf file look like?

Related

The response is not returned from Azure Database for MySQL when I try to connect from command prompt and MySQL Workbench

I run into the problem which I wrote as a Title.
The details are below.
Environments and Settings
using the Azure free plan.
created Azure Database for MySQL server (version 8.0).
Deny public network access: No
added firewall rule Start IP: 0.0.0.0 - End IP: 255.255.255.255.
Enforce SSL connection: DISABLED
Client OS: Windows 10 Pro Version 2004 OS Build 19041.685
Overview
Connection security
Ehenomenon
I can connect from Azure Cloud Shell.
I can connect from local DBeaver client (Community Edition 21.2.3).
However, I cannot connect from local Command Prompt or MySQL Workbench. The response is not returned.
It seems to be hanged out. I allowed these apps to communicate via Windows Defender firewall.
Azure Cloud Shell
DBeaver
Command Prompt
MySQL Workbench
Firewall
What's wrong? Please help.
It looks like there is a problem with the latest MySQL 8.0.27 release. I've encountered the same issues you describe when trying to connect using the command line from different MacOS and Linux machines.
There 's also a bug reported here: https://bugs.mysql.com/bug.php?id=105288
I suggest you add your findings to it as well.
I tried a bunch of different things before simply rolling back to 8.0.26, which still works fine for me.

phpstorm debugging mamp but not my remote server

I have tried many ways to debug my remote server but I am unable to do so. My ftp and sftp and remote db is configures to my phpstorm 9 but I cannot debug my remote server it is connecting to my mamp server and debugging ,y local files but not connecting to server username and password . Basically it fails at mysql_connect but works for mamp.How can I make it deubug with server.Everything else is synced with server but I cannot debug. I really appreciate any help.
Edit: Should I install x-debug on my server(cpanel) also ?
php.ini
[xdebug]
zend_extension="/usr/local/opt/php55-xdebug/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
xdebug.remote_connect_back=1
Maybe I didn't understand your question/problem. These are the ways you can debug your code
Debug the local code that uses the local database
This is the easiest setup and it probably already works on your system. You have all the files on the local computer and also you have an instance of MySQL running on it. The code connects to localhost:3306, the xdebug extension is installed and it can connect to PhpStorm, everybody is happy.
Debug the local code that uses the remote database
You can have all the PHP files on localhost and use the local mamp stack to debug it; you control the environment, xdebug works and happily collaborates with PhpStorm. You want the code to be able to use the remote (live) database.
In this case you need a way to access the database. Either you create a MySQL user that allows you to connect from the IP address of the local computer (a firewall along the way might prevent this), or start a ssh session that creates a tunnel from the local port 3306 (or any other open port you choose) to port 3306 of the database server (assuming the host where you ssh is allowed to connect to it). You can do this by running
ssh user#remote_host -L 3306:database_host:3306
(replace user, remote_host and database_host with your actual values)
If you have a MySQL server installed and running on localhost then the local port 3306 is not open and ssh cannot use it as the source port of the tunnel. Use another port instead (let's say you use 13306):
ssh user#remote_host -L 13306:database_host:3306
Modify the local configuration files of your application to use localhost as database server and 13306 as database port.
Debug the remote code
If you want to debug the live code (it uses the live database) then you have to upload the code on the web server (the live environment) and make it work there (be able to connect to the database etc).
In order to be able to debug it you need to have the xdebug PHP extension installed on the server and properly configured in the server's php.ini configuration file.
The debugger (the remote xdebug extension) needs to connect to your local computer where PhpStorm is listening on port 9000. This is either impossible or making it happen requires changing configuration here and there in several places (that might be out of your control); we better forget about it.
We can use the ssh tunnel trick: start a ssh connection to the server that creates a tunnel from local port 9000 to the servers port 9000:
ssh user#remote_host -L 9000:localhost:9000
Test if it works
PhpStorm provides a tool that uploads a script on the web server then tries to access it to check if the xdebug extension is properly configured. Depending on the version of PhpStorm you use, you can find it either in the menu (Run -> Web Server Debug Validation, on PhpStorm 9) or somewhere in the Settings (PHP -> Servers or around, on older versions).

Unable to access port 3306 for mySQL Workbench

I have enabled this through windows Firewall. (I use Avast Free which doesn't have a free firewall) and I have went onto the BT router to port forward this too. Yet I still get system error 10060. I have downloaded PfPortchecker and checked port 3306 and apparently it's still not open.
I am pretty clueless on what to do here, any help is appreciated cheers.
If both MySQL Workbench and your MySQL server run on the same machine then you don't need to open any port on the modem or in the firewall. Focus on problems on your local machine.
First thing to check is: is your server actually running? Is there a service that starts the MySQL server? What setup is that? Did you install the server via the MySQL Windows Installer? If the server is running check the config file if TCP/IP networking is disabled for some weird reason (it should not, but who knows). If that is disabled you can only connect via a named pipe to your server.
Next step is to check is that the user you use to connect is actually allowed to connect from the local machine. Jeremy is right here, it matters if you use localhost or 127.0.0.1, especially if IPv6 is enabled on the box (where localhost resolves to ::1, instead of 127.0.0.1).

ExpressionEngine Installation Issues: Database Connection Error on Localhost

Running into an odd issue with a getting a successful localhost install of ExpressionEngine 2.5.3.
I am able to run the ExpressionEngine Installation and Update Wizard where server settings, database setting and admin account information is entered. So the Apache side is working as expected, or so I assume.
The issue crops up when I click on the Install ExpressionEngine button — the point where the installer starts working it's magic — get this error:
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: controllers/wizard.php
Line Number: 1532
For the SQL Server Address, Username and Password, I am using the same values I have used in the past: localhost for the server address, root for the username and root for the password.
Those credentials work when used with Sequel Pro 0.9.9.1.
Permissions on config.php and database.php — both empty files — are set to 666, as suggested by the ExpressionEngine installation documentation.
I am trying this on a MacBook Air running 10.8.2 with the built-in Apache and MySQL running via XAMPP. I am using VirtualHost X to so http://baseline.loc/ points to baseline.loc in my Sites folder. There are no other instances of Apache or MySQL running.
I am not well versed debugging server issues but I am comfortable working in the terminal.
Any ideas what I should be looking at to figure out why this usually basic stage of a new project has become a stumbling block?
I've had issues before using localhost as the host. Does 127.0.0.1 work for you?
I've had similar in OSX using mamp, simply changed the folder permission of the web folder to everyone read/write via finder and that did the trick

Cannot follow external database(MySQL) of openfire server quide

I have MySQL database which I created on university's server
I try to develop android application that can send msg from mobile through XMPP protocol to keep data at my database server(from 1.)
At this time, I already downloaded openfire 3.7.0.dmg(MAC OS X) then try to setup server on my laptop
My problem is I cannot follow Database Installation Guide the error occurred: Does not have mysqladmin command at my Terminal. So, I cannot create table for openfire. Should I need to install MySQL on my laptop ?
Moreover, I pretty much confuse with [YOUR_HOST] of this statement :
jdbc:mysql://[YOUR_HOST]/[DATABASE_NAME]
I don't know what is it? should be localhost or anything?
Anyone can help me ? Thank you so much
You need to have MySQL installed on one computer you have access to. If you want to install it on your Mac, you can either download it directly from mysql.com, or you could install it using a package manager like Homebrew.
Next, make sure your MySQL install can listen for connections over TCP; there's a troubleshooting guide for that.
Next, use the name of the machine your MySQL server is running on in place of [YOUR_HOST]. If it's running on the same machine as OpenFire, you can use localhost.