Unable to login to phpmyadmin ( mysqli_real_connect(): (HY000/2002)) - mysqli

I have been trying to install WordPress on my PC , to configure WordPress i have installed wamp local server. once i start server and open phpmyadmin i login directly with my username password but sometime it will logout autometically and give the following errors .
1.#2002 - An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. — The server is not responding (or the local server's socket is not correctly configured).
2.mysqli_real_connect(): (HY000/2002): An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.

Related

Cannot open files in FileMaker Server 19(message: The host's capacity was exceeded)

I am just starting out with FileMaker and have run into a problem with FileMaker Server 19. I have a client file that I have shared with the server which is showing up as expected in the FMS Admin console under the Databases tab. However, when I try to open it to make it active in FM Server, it won't open.
The only message I receive is that the host's capacity has been exceeded, which doesn't make sense since it is a fresh install and no clients have been hosted yet.
I have looked around online to try to find a solution but haven't found anything that works. Most solutions refer to the number of simultaneous clients permitted by FM Server.
Any help is much appreciated.

VM from Google Cloud SQL rejecting connection

I have set up a google cloud sql server using the tutorial on youtube. However, Whenever I try to connect to it through the browser, the connect to it through the browser, the error i am getting is ERR_CONNECTION_REFUSED . The firewalls I have set up correlate to whats in the browser. I can also SSH into the VM. But the VM always rejects my connection. I have been trying for days.
Here are my VM Settings allowing http connections
Here is my VM External IP Address
Here is what the browser tells me when i attempt to connect.
Are you referring to this video https://www.youtube.com/watch?v=_kQXgjIfLgo?
In that video there are some steps missing such as install the web server (e.g. Apache) and PHP in the VM. After you install them, you can execute the following command in the VM:
php /var/www/index.php
If it works you can see the source code of the resulting page and if not you'll have an error to solve (maybe a package to install like php-mysql).
Once you can see the resulting page in the VM you can try to load the page through the browser of your machine. If it still doesn't work there is an Apache or network misconfiguration.

MQ Connect failed with 2195

I have WAS MQ 7.1 Server installed in windows. My application running on unix is trying to connect to this server during which it gives the error "MQ Connect failed 2195" in the application logs. On debugging the code , i found it is while connecting to the q manager that it is throwing this error.
I tried to run a netstat on the MQ Server port no. and do a telnet to check if there is any connection being established . But I could not see any connection being established to the q manager .
The possible issues could be
1. Que Manager has not been started
2. Listener not started
3. Initiation queue not started or created or attached(usually optional depending on set up)
4. Listening to the wrong Port or IP
5. Firewall stopping traffic to Port or IP
6. Queue Manager not created on destination
7. Not authorized to Queue manager and/or channel and/or queue
8. Trial MQ copy expired.
9. Wrong Queue manager name
10. Wrong channel name or password or queue or queue type
Have done the following to check if it is working fine .
1. Tried to put a message from windows to the MQ Server which was successful.
2. Gave auth(setmqaut) permission to Request queue that was created.
3. There is no firewall between application and MQ Server.
4. Channel name , q manager , IP and port no.s are correct.
In my windows MQ Setup i have created the Server connection channel and Client connection Channel.
export the mqm lib to SHLIB_PATH.
Added the application user to mqm group and also the windows user through which I had created the MQ Server setup
Had copied the AMQCLCHL.TAB to the unix machine containing the client program.
exported MQCHLTAB to the table filename
exported MQCHLLIB to the path containing the table name
exported the MQSERVER=QMgrName/CHANNEL1/hostname from the client machine.
Please let me know if I am missing anything w.r.t connection of the application(in Unix) to the MQ Server(in Windows).
2195 is MQRC_UNEXPECTED_ERROR. It implies something that should not have happened, even if you set it up wrong. It may well be accompanied with an FDC file in the errors directory. You should raise a PMR with IBM Service.

Accessing an external phpmyadmin on same network

I have a webshop running on a windows 2008 R2 server that can be accessed on a client PC in the same network.
It's working fine, but now I need to get the database from another windows 2008 server instead of running it on the same machine.
I've already installed WAMP on the new server, imported the database into phpmyadmin and opened port 80 for the firewall. In my connection file for the webshop I've changed the HOST to "192.168.0.17:80" (IP adress of the DB server).
I can still connect to the shop and use anything that doesn't use a database, but when I do need the database it loads for a while and it shows me a timeout error.
Pinging to the database from the Webhost server works.
Am I missing something?
Edit:
I can now access PHPMyAdmin from the Webserver through "192.168.0.17/phpmyadmin".
What would I have to enter in the PHP file to connect it to the database?
If you have phpMyAdmin and the webserver running on 192.168.0.17, and the database on, say, 192.168.0.20, then two things need to happen to allow phpMyAdmin to access the database.
MySQL needs to allow users to connect from other machines. By default, this usually is permitted; I'm not particularly sure what changes WAMP might make. If you've created users with host 'localhost', they won't work and you'll need to increase their permissions by modifying the host or creating a new similar user. The usual disclaimers apply about backing up first.
phpMyAdmin needs to be configured to look at the new MySQL server instead of localhost. Open up config.inc.php and edit or change the $cfg['Servers'][$i]['host']... line to read $cfg['Servers'][$i]['host'] = '192.168.0.20';
Once you've done that, you can open up the phpMyAdmin on your webserver and it should now attempt to connect to the other server that now has your MySQL server installed.
I've already installed WAMP on the new server, imported the database
into phpmyadmin and opened port 80 for the firewall. In my connection
file for the webshop I've changed the HOST to "192.168.0.17:80" (IP
adress of the DB server).
I'm not sure what this means. Your web application (what I presume you mean by "webshop") does need to know where the new database is, but port 80 is for web traffic, not MySQL connections (which are port 3306 by default).
One more little note:
In the title you mention "an external phpmyadmin", but in the case of networking as you describe "external" generally means "outside the local network" (which in turn generally means "anywhere on the internet"); I think you mean another machine on the same network which would be internal to your network.
Edit
I realized I'm more confused about your question than I thought, because you wrote
Edit: I can now access PHPMyAdmin from the Webserver through
"192.168.0.17/phpmyadmin".
Which doesn't make sense. I thought you have two servers, the webserver (which runs your web application and phpMyAdmin) and the database server. I am starting to suspect the webserver is actually 192.168.0.17, in which case you've correctly configured your phpMyAdmin to access the new MySQL server, so all you should have to do is update your web application to the proper IP address (without a port!); simply matching what you have in phpMyAdmin's config.inc.php. So instead of 192.168.17:80 as the host in your web application, you want the same hostname or IP address that phpMyAdmin is using to connect to. You can find that on the main page as well under the "Database server" section.

What's Difference Between Ubuntu Server (32bit) and Desktop (32bit) In Socket Programming

I am working on a server/client based project. I almost finished my server side code.
I develop the server app in EclipseCDT on Ubuntu Desktop, and everything just works fine.
But when deploy my app to a Ubuntu Server (I tried Server 10.04/10.10), the server app can start normally (waiting for connection), but the same client just cannot connect to the server.
I use Socket for receiving and sending data to/from the client.
Peter
P.S.: if I install sudo apt-get install ubuntu-desktop on my server machine, then everything works fine again.
===========================================================================
New Findings from the source code:
LabelStartBlocking:
int newScoketId = ::accept(socketId, 0, 0); // socketId == 3 ::accept is define in socket.h
// waiting for connection
LabelResume: // if new connection coming
// Do something with newSocketId
The behavior difference between Ubuntu Desktop and Server is:
On Ubuntu Desktop version, when the server starts, it is blocked at LabelStartBlocking with the socket routine ::accept; and then if a new connection arrives, the server will resume at LabelResume and create a new socket connection using the return value newSocketId;
However, on Ubuntu Server version, when the server starts, it is also blocked at LabelStartBlocking with the socket routine ::accept, but if a new connection arrives, the server won't resume at LabelResume, and the new socket connection CANNOT be created.
Can you guys help me out?
Peter
Thanks for your attention.
I finally figured it out.
If there are more than one IP addresses for the same hostname (/etc/hosts), the old code will fail.
Example /etc/hosts file:
127.0.0.1 localhost YourHostName
10.50.10.251 YourHostName
I traced the calling stack, and I found that, the IP address (10.50.10.251) passed to the program is translated into hostname, and then later the hostname is translated back to IP address (for binding), but a DIFFERENT one, that's why my server program cannot accept any client connection.
Hope it helps if any others have the similar issue.
Peter