Error 1130 connecting to MySQL on Ubuntu Server 12.04
Solution 1
Ok, this was such as silly oversight on my part, but the following 2 links pointed me in the right direction:
- http://www.ghacks.net/2009/12/27/allow-remote-connections-to-your-mysql-server/
- Port Forwarding to Connect to MySQL Database of VirtualBox
So in the spirit of helping someone else out who might have the same problem...
I created a new user, granted him all privileges, and set the host
to %
to allow connections from any IP. Logged in with the new user, and voila! all good
Solution 2
On your server run mysql from command line:
mysql -u root -p -h localhost -P 3306
Then run this command in mysql shell:
>use mysql
>GRANT ALL ON *.* to root@'%' IDENTIFIED BY 'pass';
>FLUSH PRIVILEGES;
Have a nice time.
Related videos on Youtube
april26
Updated on September 18, 2022Comments
-
april26 over 1 year
JSF 2.
A simple form with a single input that is validated. Using o:form in an attempt to fix the problem.
<f:view> <f:metadata> <f:viewParam name="info2" value="#{myClass.info2}" /> <f:viewParam name="info1" value="#{myClass.info1}" /> <f:event listener="#{myClass.init(}" type="preRenderView" /> </f:metadata> <o:form includeViewParams="true"> <h:outputText value="Enter some info for #{myClass.info1}" /> <h:inputText id="input" value="#{myClass.info3}" validator="myValidator" /> <br /> <h:commandButton action="#{myClass.action()}" value="Enter some info" /> <br /> <h:message for="input" /> <br /> <h:outputText value="#{myClass.info2}" /> </o:form> </f:view>
Called with this URL
http://localhost:8080/test/test.xhtml?info1=hello&info2=there
When I put a value in the input field and the validation fails, the page comes back with the same URL, but with both myClass.info1 and myClass.info2 set to null. It's great that the URL is preserved, but it doesn't do much good if those parameters arent' being set in the bean.
Why is that and how do I fix it?
-
Michele Mariotti about 10 yearsconsider using f:ajax for commandButton and o:viewParam instead of f:viewParam
-
april26 about 10 yearsI realized this post is a MUCH better rendering of the question stackoverflow.com/questions/16187049/… . Can I withdraw the question at this point?
-
-
sighrobot over 9 yearsMay i ask you, what is the reason for this problem?