And then we need the how to create a grant all user for a mysql database.
Yep there was a time in our sleep deprived environment that we need to create a user for our ultra secured mysql server. He wants a GRANT ALL permission on a new database. So you’re googling the internet because you are lazy and found my site. I don’t want hearing the “You disappoint son” verbiage so here’s how.
So we will create a database called CRM. *note we will be using a vicidialNOW uhm goautodial VICIDIAL auto install.
[root@vici ~]# mysql -uroot -pvicidialnow
Now you’ll see this
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1474214
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
Then you need to type this command
CREATE DATABASE `crm` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
You’ll see this output
mysql> CREATE DATABASE `crm` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Query OK, 1 row affected (0.08 sec)
Congratulations! you just created a new mysql database!
Now let’s create a user with a GRANT ALL privileges to that new mysql database.
For a user with local access capability :
mysql> GRANT all on crm.* TO USERNAME@localhost IDENTIFIED BY 'iphone1234';
Query OK, 0 rows affected (0.02 sec)
with accessing the database outside the mysql server
mysql> GRANT all on crm.* TO USERNAME@'%' IDENTIFIED BY 'iphone1234';
Query OK, 0 rows affected (0.00 sec)
Nope you’re not done yet because no matter what you’ll do you can’t still use the log-in info you created. You need the flush the toilet errr sorry! flush the privileges rather.
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Now you’re done. Hit the comment page if you need to ask some question about the said how to.
The ugly way to WAN failover.
I’m just posting this for posterity sake.
So you have 2 NIC cards connected to different ISP. You wanted to have one to do a fail over once the other is dead.
Use this bash script.
#!/bin/bash
GW1=”192.168.10.254″
GW2=”192.168.55.254″
TESTIP=”192.71.220.10″ # Any reliable Internet ip that responds to ping.
CURGW=`/sbin/route -n |awk ‘/^0.0.0.0/ {print $2 }’`
if ping -w2 -c3 $TESTIP >/dev/null 2>&1; then
echo “Active ISP is Ok.”
else
if [ "$CURGW" = "$GW1" ]; then
NEWGW=”$GW2″
else
NEWGW=”$GW1″
fi
/sbin/route del default
/sbin/route add default gw $NEWGW
fi
Save and add it to your crontab.
Mounting an NTFS external hard drive on centos
I had a requirement to back up all the files on an archive server and I thought Ill just hook up the 1 terabyte hd on USB and issue mount -t ntfs-3g /dev/sda /mnt/external and be done with it. But no it didnt work, so I have to configure the server to support it.
Here’s how:
Get RPMforge:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
Install Dag’s GPG keys:
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
Verify what you have downloaded:
rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm
Then install it:
rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm
check if it is working:
yum check-update
So we got RPMforge now what?
Let’s install what we needed in order to get that external usb hard drive to work with our centos server!
yum install fuse fuse-ntfs-3g dkms dkms-fuse -y
Wait for it to install then once done, lets create a exterhdd directory.
mkdir /mnt/exterhdd
Now we mount the external hard drive:
mount -t ntfs-3g /dev/sda1 /mnt/exterhdd
You’re done.
Philabs and the requirement to be math proficient to get funding for start ups.
This had my blood boiling.
What this? If N<=100, what is the number of strings not greater than N in length that will entirely match (case-sensitive) the following regular expression: (ph){1,5}i+l+abs*
Now that my friend is the first question when you are asking for a funding from philabs. What is philabs?
Here's what they say about themselves.
PhiLabs is an idea incubator that provides capital to smart people with new ideas. Where capital is lacking, PhiLabs seeks to reward people who have great and innovative ideas by ensuring that enough capital is available to really develop the idea into a reality and a feasible business.
We at PhiLabs are looking forward in creating new and exciting companies by combining young aspiring entrepreneurs’ ideas, tech skills and business experience into a self sustaining business. In addition to our funding and facilities, we add value by sharing our experience in building and operating companies both offline and online. We provide a conducive environment for both learning and growth for any young entrepreneur.
Nice and dandy right?
Then that question is the first to be filled up when applying for funding.
Here’s my comment about them, I left it at yuga’s site.
They can shove their money up in their collective asses.
What this? If N<=100, what is the number of strings not greater than N in length that will entirely match (case-sensitive) the following regular expression: (ph){1,5}i+l+abs*
Oh yeah right, only the people who can answer that can think and implement bright ideas.
Have you heard of facebook? How about napster? Oh how about Apple or Microsoft? Or Michael Dell, have you heard of him?
Kakainis mga masyadong mayabang.
Smart SurfTV – A cheap way to have internet at home?
I found gonz’s tweet about the smart’s press release on surftv. Here’s the gist of the press release:
Smart Bro SurfTV is a device that connects to a television set through a quick and easy procedure, to provide Internet access using Smart Bro’s nationwide coverage. When plugged into the RCA port of a color TV set, Smart Bro SurfTV provides users a ready-to-run Internet experience, and users can surf, chat, and email –- through a multi-tasking TV — at home.
“Over the last few years we have been steadily advancing our Internet for All advocacy and investing our energies to make wireless Internet more affordable and widely available – whether via mobile phone, the PC, or laptop – anytime, anywhere, so that Filipinos may benefit from it. Offering Smart Bro SurfTV is a natural progression of that strategy, this is a service that will put the Internet right in the homes of Filipino families,” said Orlando B. Vea, Chief Wireless Advisor of SMART.Internet in all homes
Smart Bro SurfTV comes in a boxed set complete with a keyboard, a mouse, a remote control, and a Smart Bro USB stick-type modem with a prepaid SIM, pre-loaded with PhP100 worth of load. The entire kit costs only PhP4,500, and Internet access costs only PhP10 for every 30 minutes. Load for the prepaid Smart Bro SIM is available through any of SMART’s network of over a million Smart Load sellers all over the country.“Limited access to devices such as desktops computers used to be a barrier to bringing the benefits of the Internet to Filipinos. Even basic desktop computers are still priced beyond what most households can afford. This is what we hope to address through Smart Bro SurfTV. With this service, people can access the Internet using a low-cost device and an appliance they already have,” said Danilo J. Mojica, head of SMART’s Wireless Consumer Division.
I find it interesting because I used to read about the webtv. It went bust during the dotcom burst I think.
Anyhow this is a cool idea. I don’t know much about the specs yet but I hope this runs on linux. And yes I hope their network can accomodate the traffic.
By the way the price is PHP 4,500 pesos (about $100 usd)
Because we always forget the root password of mysql.
An old client of mine emailed me a while ago asking about the password of the MySQL server.
I have installed their VICIDIAL Predictive Dialer like a year ago. They only used it for manual dialing using eyebeam
. Anyhow so I tried to login to the MySQL server using the only password I l know and it didint work! So I have no choice but to reset the root password of the Mysql Server.
Ok what do you need in order to reset or change the root password of MySQL?
1) You need root access to the server. If you dont have it, then you are out of luck! Ask your server administrator to execute the next steps.
2) The reason why you need root access is, for you to be able to stop the MySQL daemon. Here’s how to stop the MySQL daemon in Centos:
service mysqld stop
3) Now the next part is to start the MySQL server and also we need to skip the grant tables because its where the password are stored. Here’s how:
mysqld_safe --skip-grant-tables
You thought you’re done? Not yet! You have to open or connect another ssh session in order to enter MySQL server. As what you are going to experience when you’re going to try this howto, is that you dont see any processes or what ever just the cursor blinking
. Just leave it at that and open up another connection.
So when you are connected to the shell again, log in to the MySQL server by typing this:
mysql -uroot mysql
And then VIOLA! you are now inside the mysql server and as root too! Let’s change the root password of the MySQL server now. You can do that by typing the following command in the MySQL cli or console. The new password of the MySQL server will be pK@t9l5? . Type this: (Change the pK@t9l5? to the password you want to be specified.)
update user set Password=PASSWORD('pK@t9l5?') where user='root';
Then type this command next.
flush privileges;
Last but not the least. We need to exit from the MySQL console:
exit;
That’s it! You have changed the root password of the MySQL server
.
Ok don’t forget to stop the process:
mysqld_safe --skip-grant-tables
Then turn on the MySQL server again by typing:
service mysqld start
Hitler’s reaction to iPad
Hahahaha Mark E. sent me this youtube link and I almost fell from my chair trying to suppress a laugh.
Watch and enjoy!
Forgot your password? No problem!
I found this from reddit while waiting for a miracle to happen.

McGraw-Hill CEO Confirms Apple Tablet. OMFG!!!
Apple tablet. The big brother of my iPhone. JUST GOT CONFIRMED.
The OS of the thing is based on iPhone. I just soiled my pants. Here’s what the man said:
“Yeah, Very exciting. Yes, they’ll make their announcement tomorrow on this one. We have worked with Apple for quite a while. And the Tablet is going to be based on the iPhone operating system and so it will be transferable. So what you are going to be able to do now is we have a consortium of e-books. And we have 95% of all our materials that are in e-book format on that one. So now with the tablet you’re going to open up the higher education market, the professional market. The tablet is going to be just really terrific.”
The apple tablet is currently a hot topic since IPOD days. A lot of apple fanboys are having wet dreams about a tablet that they can purchase and fap upon. Honestly Im turning into one myself since I got my iPhone last christmas.
Here’s the CNBC interview with the CEO of McGraw-Hill (one of the publishers around)
Time to start saving money eh?
ATM Machines using windows XP
I was getting some money from an ATM machine when I saw this….. Pretty funny then I remembered it’s one of my bank..
